From fa806f62fabc6ef3594f25516e8055c5825b53f7 Mon Sep 17 00:00:00 2001 From: Karl-Wilfried Zimmer Date: Sun, 31 Dec 2023 14:48:12 +0100 Subject: [PATCH] added small eigen example --- CMakeLists.txt | 8 ++++++++ include/main.h | 3 +++ main.cpp | 11 ++++++++++- 3 files changed, 21 insertions(+), 1 deletion(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index f9adf53..0ed554a 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -2,6 +2,14 @@ cmake_minimum_required(VERSION 3.10) project(Geometry) +set(CMAKE_CXX_STANDARD 17) + include_directories(${PROJECT_SOURCE_DIR}/include) +add_subdirectory(lib/eigen) + add_executable(Geometry main.cpp) + +target_link_libraries(Geometry PUBLIC Eigen3::Eigen) + +target_include_directories(Geometry PUBLIC "${PROJECT_BINARY_DIR}" "${PROJECT_SOURCE_DIR}/lib/eigen/Eigen") diff --git a/include/main.h b/include/main.h index c619cdb..74c6840 100644 --- a/include/main.h +++ b/include/main.h @@ -6,9 +6,12 @@ #define GEOMETRY_MAIN_H #include +#include using namespace std; +void eigenExample(); + int main(); #endif //GEOMETRY_MAIN_H diff --git a/main.cpp b/main.cpp index 3d9e3e5..ae97491 100644 --- a/main.cpp +++ b/main.cpp @@ -1,6 +1,15 @@ #include "main.h" int main(){ - cout<<"Hello World"; + cout<<"Hello World"<