running after restruct

This commit is contained in:
Karl-Wilfried Zimmer 2023-12-31 16:18:33 +01:00
parent 28006c38e5
commit f21f0adbd1
7 changed files with 21 additions and 14 deletions

View File

@ -17,7 +17,7 @@ FetchContent_Declare(
)
FetchContent_MakeAvailable(eigen)
include_directories(${PROJECT_SOURCE_DIR}/include ${PROJECT_SOURCE_DIR}/Geometry)
#include_directories(${PROJECT_SOURCE_DIR}/include ${PROJECT_SOURCE_DIR}/Geometry)
add_subdirectory(src)

View File

@ -1,3 +1,3 @@
add_executable(app main.cpp)
target_link_libraries(app PUBLIC Eigen3::Eigen)
target_link_libraries(app PUBLIC Eigen3::Eigen Geometry)

View File

@ -1,15 +1,8 @@
#include "Geometry/dummy.h"
#include "main.h"
int main(){
cout<<"Hello World"<<endl;
eigenExample();
return 0;
}
void eigenExample(){
Eigen::MatrixXd m(2,2);
m(1,0) = 2.5;
m(0,1) = -1;
m(1,1) = m(1,0) + m(0,1);
cout << m << endl;
}

View File

@ -5,4 +5,6 @@
#ifndef GEOMETRY_DUMMY_H
#define GEOMETRY_DUMMY_H
void eigenExample();
#endif //GEOMETRY_DUMMY_H

View File

@ -10,8 +10,6 @@
using namespace std;
void eigenExample();
int main();
#endif //GEOMETRY_MAIN_H

View File

@ -3,7 +3,9 @@ set(HEADER_LIST "${Geometry_SOURCE_DIR}/include/Geometry/dummy.h")
add_library(Geometry Dummy.cpp ${HEADER_LIST}
testclass.cpp)
target_include_directories(Geometry PUBLIC "${PROJECT_SOURCE_DIR}/include" "${PROJECT_SOURCE_DIR}/Geometry")
target_include_directories(Geometry PUBLIC "${PROJECT_SOURCE_DIR}/include")
target_link_libraries(Geometry PUBLIC Eigen3::Eigen)
source_group(
TREE "${PROJECT_SOURCE_DIR}/include"

View File

@ -1,4 +1,16 @@
//
// Created by nb on 31.12.23.
//
#include "dummy.h"
#include "Geometry/dummy.h"
#include <Eigen/Dense>
#include <iostream>
using namespace std;
void eigenExample(){
Eigen::MatrixXd m(2,2);
m(1,0) = 2.5;
m(0,1) = -1;
m(1,1) = m(1,0) + m(0,1);
cout << m << endl;
}