more wide reaching build ignoring
This commit is contained in:
parent
cb21cc1a6d
commit
6ff2cf0d85
3
.gitignore
vendored
3
.gitignore
vendored
@ -119,4 +119,5 @@ fabric.properties
|
||||
*.cubin
|
||||
*.fatbin
|
||||
|
||||
.idea/
|
||||
.idea/
|
||||
*build*/
|
||||
|
@ -2,14 +2,20 @@ cmake_minimum_required(VERSION 3.14)
|
||||
|
||||
project(Geometry VERSION 0.1 LANGUAGES CXX)
|
||||
|
||||
include(FetchContent)
|
||||
|
||||
if(CMAKE_PROJECT_NAME STREQUAL PROJECT_NAME)
|
||||
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 ()
|
||||
|
||||
set(CMAKE_CXX_STANDARD 17)
|
||||
|
||||
include(FetchContent)
|
||||
|
||||
FetchContent_Declare(
|
||||
eigen
|
||||
GIT_REPOSITORY https://gitlab.com/libeigen/eigen.git
|
||||
@ -17,8 +23,6 @@ FetchContent_Declare(
|
||||
)
|
||||
FetchContent_MakeAvailable(eigen)
|
||||
|
||||
#include_directories(${PROJECT_SOURCE_DIR}/include ${PROJECT_SOURCE_DIR}/Geometry)
|
||||
|
||||
add_subdirectory(src)
|
||||
|
||||
add_subdirectory(apps)
|
@ -1,3 +1,3 @@
|
||||
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 "main.h"
|
||||
#include "Geometry/dummy.hpp"
|
||||
#include "main.hpp"
|
||||
int main(){
|
||||
cout<<"Hello World"<<endl;
|
||||
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.
|
||||
//
|
||||
|
||||
#ifndef GEOMETRY_MAIN_H
|
||||
#define GEOMETRY_MAIN_H
|
||||
#ifndef GEOMETRY_MAIN_HPP
|
||||
#define GEOMETRY_MAIN_HPP
|
||||
|
||||
#include <iostream>
|
||||
#include <Eigen/Dense>
|
||||
@ -12,4 +12,4 @@ using namespace std;
|
||||
|
||||
int main();
|
||||
|
||||
#endif //GEOMETRY_MAIN_H
|
||||
#endif //GEOMETRY_MAIN_HPP
|
@ -1,4 +1,4 @@
|
||||
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})
|
||||
|
||||
|
@ -1,7 +1,7 @@
|
||||
//
|
||||
// Created by nb on 31.12.23.
|
||||
//
|
||||
#include "Geometry/dummy.h"
|
||||
#include "Geometry/dummy.hpp"
|
||||
#include <Eigen/Dense>
|
||||
#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