Commit e12d2ee 1 parent 1098f12 commit e12d2ee Copy full SHA for e12d2ee
File tree 6 files changed +16
-8
lines changed
6 files changed +16
-8
lines changed Original file line number Diff line number Diff line change @@ -49,6 +49,7 @@ set(CMAKE_CXX_STANDARD "23" CMAKE_CXX_STANDARD_REQUIRED ON CMAKE_CXX_EXTENSIONS
49
49
50
50
include (CTest)
51
51
include (FetchContent)
52
+ include (GNUInstallDirs)
52
53
53
54
FetchContent_Declare(
54
55
eigen
@@ -58,17 +59,20 @@ FetchContent_Declare(
58
59
FetchContent_Declare(
59
60
fmt
60
61
URL "https://github.com/fmtlib/fmt/archive/refs/tags/9.1.0.tar.gz"
61
- URL_HASH MD5=21fac48cae8f3b4a5783ae06b443973a)
62
+ URL_HASH MD5=21fac48cae8f3b4a5783ae06b443973a
63
+ FIND_PACKAGE_ARGS NAMES FMT)
62
64
63
65
FetchContent_Declare(
64
66
google_benchmark
65
67
URL "https://github.com/google/benchmark/archive/refs/tags/v1.6.2.tar.gz"
66
- URL_HASH MD5=14d14849e075af116143a161bc3b927b)
68
+ URL_HASH MD5=14d14849e075af116143a161bc3b927b
69
+ FIND_PACKAGE_ARGS NAMES benchmark)
67
70
68
71
FetchContent_Declare(
69
72
google_test
70
73
URL "https://github.com/google/googletest/archive/refs/tags/release-1.12.1.tar.gz"
71
- URL_HASH MD5=e82199374acdfda3f425331028eb4e2a)
74
+ URL_HASH MD5=e82199374acdfda3f425331028eb4e2a
75
+ FIND_PACKAGE_ARGS NAMES GTest)
72
76
73
77
FetchContent_MakeAvailable(eigen fmt google_test google_benchmark)
74
78
@@ -78,3 +82,5 @@ add_subdirectory(sample)
78
82
add_subdirectory (source )
79
83
add_subdirectory (support)
80
84
add_subdirectory (test )
85
+
86
+ install (DIRECTORY "include/fcarouge" DESTINATION "${CMAKE_INSTALL_INCLUDEDIR} " )
Original file line number Diff line number Diff line change @@ -21,7 +21,7 @@ Build and run the tests and samples on all platforms:
21
21
git clone --depth 1 https://github.com/FrancoisCarouge/Kalman.git " kalman"
22
22
cmake -S " kalman" -B " build" -G " Ninja Multi-Config"
23
23
cmake --build " build" --config " Debug" --parallel
24
- ctest --test-dir " build" --tests-regex " kalman_(test|sample)" --output-on-failure --parallel
24
+ ctest --test-dir " build" --build-config " Debug " -- tests-regex " kalman_(test|sample)" --output-on-failure --parallel
25
25
```
26
26
27
27
## Benchmarks
Original file line number Diff line number Diff line change @@ -59,7 +59,7 @@ foreach(BENCHMARK ${SOURCES})
59
59
"include" )
60
60
target_link_libraries (
61
61
kalman_benchmark_${NAME} _driver
62
- PRIVATE eigen kalman benchmark::benchmark_main benchmark::benchmark)
62
+ PRIVATE Eigen3::Eigen kalman benchmark::benchmark_main benchmark::benchmark)
63
63
add_test (kalman_benchmark_${NAME} kalman_benchmark_${NAME} _driver
64
64
"--benchmark_out=${NAME} .json" )
65
65
endforeach ()
Original file line number Diff line number Diff line change @@ -72,5 +72,5 @@ endif()
72
72
73
73
add_library (kalman INTERFACE )
74
74
target_include_directories (kalman INTERFACE "." )
75
- target_link_libraries (kalman INTERFACE ${LIBRARIES} )
75
+ target_link_libraries (kalman INTERFACE ${LIBRARIES} Eigen3::Eigen )
76
76
target_compile_options (kalman INTERFACE ${OPTIONS} )
Original file line number Diff line number Diff line change @@ -48,6 +48,7 @@ set(SOURCES
48
48
foreach (SAMPLE ${SOURCES} )
49
49
get_filename_component (NAME ${SAMPLE} NAME_WE )
50
50
add_executable (kalman_sample_${NAME} _driver ${SAMPLE} )
51
- target_link_libraries (kalman_sample_${NAME} _driver PRIVATE eigen kalman main)
51
+ target_link_libraries (kalman_sample_${NAME} _driver PRIVATE Eigen3::Eigen
52
+ kalman main)
52
53
add_test (kalman_sample_${NAME} kalman_sample_${NAME} _driver)
53
54
endforeach ()
Original file line number Diff line number Diff line change @@ -48,6 +48,7 @@ set(SOURCES
48
48
foreach (TEST ${SOURCES} )
49
49
get_filename_component (NAME ${TEST} NAME_WE )
50
50
add_executable (kalman_test_${NAME} _driver ${TEST} )
51
- target_link_libraries (kalman_test_${NAME} _driver PRIVATE eigen kalman main)
51
+ target_link_libraries (kalman_test_${NAME} _driver PRIVATE Eigen3::Eigen kalman
52
+ main)
52
53
add_test (kalman_test_${NAME} kalman_test_${NAME} _driver)
53
54
endforeach ()
You can’t perform that action at this time.
0 commit comments