Compare commits
2 Commits
9badee91e7
...
6ff2cf0d85
Author | SHA1 | Date | |
---|---|---|---|
|
6ff2cf0d85 | ||
|
cb21cc1a6d |
3
.gitignore
vendored
3
.gitignore
vendored
@ -119,4 +119,5 @@ fabric.properties
|
|||||||
*.cubin
|
*.cubin
|
||||||
*.fatbin
|
*.fatbin
|
||||||
|
|
||||||
.idea/
|
.idea/
|
||||||
|
*build*/
|
||||||
|
@ -2,14 +2,20 @@ cmake_minimum_required(VERSION 3.14)
|
|||||||
|
|
||||||
project(Geometry VERSION 0.1 LANGUAGES CXX)
|
project(Geometry VERSION 0.1 LANGUAGES CXX)
|
||||||
|
|
||||||
|
include(FetchContent)
|
||||||
|
|
||||||
if(CMAKE_PROJECT_NAME STREQUAL PROJECT_NAME)
|
if(CMAKE_PROJECT_NAME STREQUAL PROJECT_NAME)
|
||||||
set_property(GLOBAL PROPERTY USE_FOLDERS ON)
|
set_property(GLOBAL PROPERTY USE_FOLDERS ON)
|
||||||
|
|
||||||
|
include(CTest)
|
||||||
|
endif ()
|
||||||
|
|
||||||
|
if(CMAKE_PROJECT_NAME STREQUAL PROJECT_NAME OR GEOMETRY_BUILD_TESTING)
|
||||||
|
add_subdirectory(tests)
|
||||||
endif ()
|
endif ()
|
||||||
|
|
||||||
set(CMAKE_CXX_STANDARD 17)
|
set(CMAKE_CXX_STANDARD 17)
|
||||||
|
|
||||||
include(FetchContent)
|
|
||||||
|
|
||||||
FetchContent_Declare(
|
FetchContent_Declare(
|
||||||
eigen
|
eigen
|
||||||
GIT_REPOSITORY https://gitlab.com/libeigen/eigen.git
|
GIT_REPOSITORY https://gitlab.com/libeigen/eigen.git
|
||||||
@ -17,8 +23,6 @@ FetchContent_Declare(
|
|||||||
)
|
)
|
||||||
FetchContent_MakeAvailable(eigen)
|
FetchContent_MakeAvailable(eigen)
|
||||||
|
|
||||||
#include_directories(${PROJECT_SOURCE_DIR}/include ${PROJECT_SOURCE_DIR}/Geometry)
|
|
||||||
|
|
||||||
add_subdirectory(src)
|
add_subdirectory(src)
|
||||||
|
|
||||||
add_subdirectory(apps)
|
add_subdirectory(apps)
|
@ -1,3 +1,3 @@
|
|||||||
add_executable(app main.cpp)
|
add_executable(app main.cpp)
|
||||||
|
|
||||||
target_link_libraries(app PUBLIC Eigen3::Eigen Geometry)
|
target_link_libraries(app PUBLIC Geometry)
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
#include "Geometry/dummy.h"
|
#include "Geometry/dummy.hpp"
|
||||||
#include "main.h"
|
#include "main.hpp"
|
||||||
int main(){
|
int main(){
|
||||||
cout<<"Hello World"<<endl;
|
cout<<"Hello World"<<endl;
|
||||||
eigenExample();
|
eigenExample();
|
||||||
|
@ -1,10 +0,0 @@
|
|||||||
//
|
|
||||||
// Created by nb on 31.12.23.
|
|
||||||
//
|
|
||||||
|
|
||||||
#ifndef GEOMETRY_DUMMY_H
|
|
||||||
#define GEOMETRY_DUMMY_H
|
|
||||||
|
|
||||||
void eigenExample();
|
|
||||||
|
|
||||||
#endif //GEOMETRY_DUMMY_H
|
|
10
include/Geometry/dummy.hpp
Normal file
10
include/Geometry/dummy.hpp
Normal file
@ -0,0 +1,10 @@
|
|||||||
|
//
|
||||||
|
// Created by nb on 31.12.23.
|
||||||
|
//
|
||||||
|
|
||||||
|
#ifndef GEOMETRY_DUMMY_HPP
|
||||||
|
#define GEOMETRY_DUMMY_HPP
|
||||||
|
|
||||||
|
void eigenExample();
|
||||||
|
|
||||||
|
#endif //GEOMETRY_DUMMY_HPP
|
@ -2,8 +2,8 @@
|
|||||||
// Created by nb on 31.12.23.
|
// Created by nb on 31.12.23.
|
||||||
//
|
//
|
||||||
|
|
||||||
#ifndef GEOMETRY_MAIN_H
|
#ifndef GEOMETRY_MAIN_HPP
|
||||||
#define GEOMETRY_MAIN_H
|
#define GEOMETRY_MAIN_HPP
|
||||||
|
|
||||||
#include <iostream>
|
#include <iostream>
|
||||||
#include <Eigen/Dense>
|
#include <Eigen/Dense>
|
||||||
@ -12,4 +12,4 @@ using namespace std;
|
|||||||
|
|
||||||
int main();
|
int main();
|
||||||
|
|
||||||
#endif //GEOMETRY_MAIN_H
|
#endif //GEOMETRY_MAIN_HPP
|
@ -1,6 +1,6 @@
|
|||||||
set(HEADER_LIST "${Geometry_SOURCE_DIR}/include/Geometry/dummy.h")
|
set(HEADER_LIST "${Geometry_SOURCE_DIR}/include/Geometry/dummy.hpp")
|
||||||
|
|
||||||
add_library(Geometry Dummy.cpp ${HEADER_LIST})
|
add_library(Geometry dummy.cpp ${HEADER_LIST})
|
||||||
|
|
||||||
target_include_directories(Geometry PUBLIC "${PROJECT_SOURCE_DIR}/include")
|
target_include_directories(Geometry PUBLIC "${PROJECT_SOURCE_DIR}/include")
|
||||||
|
|
||||||
|
@ -1,7 +1,7 @@
|
|||||||
//
|
//
|
||||||
// Created by nb on 31.12.23.
|
// Created by nb on 31.12.23.
|
||||||
//
|
//
|
||||||
#include "Geometry/dummy.h"
|
#include "Geometry/dummy.hpp"
|
||||||
#include <Eigen/Dense>
|
#include <Eigen/Dense>
|
||||||
#include <iostream>
|
#include <iostream>
|
||||||
|
|
11
tests/CMakeLists.txt
Normal file
11
tests/CMakeLists.txt
Normal file
@ -0,0 +1,11 @@
|
|||||||
|
FetchContent_Declare(
|
||||||
|
catch
|
||||||
|
GIT_REPOSITORY https://github.com/catchorg/Catch2.git
|
||||||
|
GIT_TAG v2.13.6)
|
||||||
|
FetchContent_MakeAvailable(catch)
|
||||||
|
|
||||||
|
add_executable(testlib testgeometry.cpp)
|
||||||
|
|
||||||
|
target_link_libraries(testlib PRIVATE Geometry Catch2::Catch2)
|
||||||
|
|
||||||
|
add_test(NAME testlibtest COMMAND testlib)
|
Loading…
Reference in New Issue
Block a user