Skip to content

Commit

Permalink
[cmake] regroup project options
Browse files Browse the repository at this point in the history
  • Loading branch information
FrancoisCarouge committed Oct 5, 2024
1 parent 0d24b68 commit b8f2475
Show file tree
Hide file tree
Showing 4 changed files with 4 additions and 44 deletions.
4 changes: 4 additions & 0 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,10 @@ project(
LANGUAGES "CXX"
VERSION "0.4.0")

set(CMAKE_CXX_EXTENSIONS OFF)
set(CMAKE_CXX_STANDARD 26)
set(CMAKE_CXX_STANDARD_REQUIRED ON)
set(CMAKE_INTERPROCEDURAL_OPTIMIZATION ON)
set(CPACK_PACKAGE_CHECKSUM "SHA512")
set(CPACK_PACKAGE_DESCRIPTION_FILE "${CMAKE_SOURCE_DIR}/README.md")
set(CPACK_RESOURCE_FILE_LICENSE "${CMAKE_SOURCE_DIR}/LICENSE.txt")
Expand Down
15 changes: 0 additions & 15 deletions benchmark/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -59,11 +59,6 @@ foreach(BENCHMARK "baseline.cpp" "predict_1x1x0.cpp" "predict_1x1x1.cpp"
get_filename_component(NAME ${BENCHMARK} NAME_WE)
add_executable(kalman_benchmark_${NAME}_driver ${BENCHMARK})
target_include_directories(kalman_benchmark_${NAME}_driver PRIVATE "include")
set_target_properties(
kalman_benchmark_${NAME}_driver
PROPERTIES CXX_STANDARD 23
CXX_EXTENSIONS OFF
INTERPROCEDURAL_OPTIMIZATION TRUE)
target_link_libraries(
kalman_benchmark_${NAME}_driver
PRIVATE benchmark::benchmark benchmark::benchmark_main kalman
Expand All @@ -86,11 +81,6 @@ foreach(BACKEND IN ITEMS "eigen" "naive")
target_include_directories(
kalman_benchmark_predict_${BACKEND}_${STATE_SIZE}x1x${INPUT_SIZE}_driver
PRIVATE "include")
set_target_properties(
kalman_benchmark_predict_${BACKEND}_${STATE_SIZE}x1x${INPUT_SIZE}_driver
PROPERTIES CXX_STANDARD 23
CXX_EXTENSIONS OFF
INTERPROCEDURAL_OPTIMIZATION TRUE)
target_link_libraries(
kalman_benchmark_predict_${BACKEND}_${STATE_SIZE}x1x${INPUT_SIZE}_driver
PRIVATE benchmark::benchmark benchmark::benchmark_main kalman
Expand Down Expand Up @@ -118,11 +108,6 @@ foreach(BACKEND IN ITEMS "eigen")
target_include_directories(
kalman_benchmark_update_${BACKEND}_${STATE_SIZE}x${OUTPUT_SIZE}x0_driver
PRIVATE "include")
set_target_properties(
kalman_benchmark_update_${BACKEND}_${STATE_SIZE}x${OUTPUT_SIZE}x0_driver
PROPERTIES CXX_STANDARD 23
CXX_EXTENSIONS OFF
INTERPROCEDURAL_OPTIMIZATION TRUE)
target_link_libraries(
kalman_benchmark_update_${BACKEND}_${STATE_SIZE}x${OUTPUT_SIZE}x0_driver
PRIVATE benchmark::benchmark benchmark::benchmark_main kalman
Expand Down
15 changes: 0 additions & 15 deletions sample/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -40,11 +40,6 @@ foreach(SAMPLE "kf_1x1x0_building_height.cpp" "kf_1x1x0_liquid_temperature.cpp"
"kf_1x1x1_dog_position.cpp")
get_filename_component(NAME ${SAMPLE} NAME_WE)
add_executable(kalman_sample_${NAME}_driver ${SAMPLE})
set_target_properties(
kalman_sample_${NAME}_driver
PROPERTIES CXX_STANDARD 23
CXX_EXTENSIONS OFF
INTERPROCEDURAL_OPTIMIZATION TRUE)
target_link_libraries(kalman_sample_${NAME}_driver PRIVATE kalman kalman_main
kalman_options)
separate_arguments(TEST_COMMAND UNIX_COMMAND $ENV{COMMAND})
Expand All @@ -56,11 +51,6 @@ foreach(BACKEND IN ITEMS "eigen" "naive")
foreach(SAMPLE "ekf_4x1x0_soaring.cpp" "kf_2x1x1_rocket_altitude.cpp")
get_filename_component(NAME ${SAMPLE} NAME_WE)
add_executable(kalman_sample_${BACKEND}_${NAME}_driver ${SAMPLE})
set_target_properties(
kalman_sample_${BACKEND}_${NAME}_driver
PROPERTIES CXX_STANDARD 23
CXX_EXTENSIONS OFF
INTERPROCEDURAL_OPTIMIZATION TRUE)
target_link_libraries(
kalman_sample_${BACKEND}_${NAME}_driver
PRIVATE kalman kalman_main kalman_linalg_${BACKEND} kalman_options)
Expand All @@ -76,11 +66,6 @@ foreach(BACKEND IN ITEMS "eigen")
"kf_8x4x0_deep_sort_bounding_box.cpp")
get_filename_component(NAME ${SAMPLE} NAME_WE)
add_executable(kalman_sample_${BACKEND}_${NAME}_driver ${SAMPLE})
set_target_properties(
kalman_sample_${BACKEND}_${NAME}_driver
PROPERTIES CXX_STANDARD 23
CXX_EXTENSIONS OFF
INTERPROCEDURAL_OPTIMIZATION TRUE)
target_link_libraries(
kalman_sample_${BACKEND}_${NAME}_driver
PRIVATE kalman kalman_main kalman_linalg_${BACKEND} kalman_options)
Expand Down
14 changes: 0 additions & 14 deletions test/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -47,11 +47,6 @@ foreach(
"kalman_println.cpp")
get_filename_component(NAME ${TEST} NAME_WE)
add_executable(kalman_test_${NAME}_driver ${TEST})
set_target_properties(
kalman_test_${NAME}_driver
PROPERTIES CXX_STANDARD 23
CXX_EXTENSIONS OFF
INTERPROCEDURAL_OPTIMIZATION TRUE)
target_link_libraries(kalman_test_${NAME}_driver
PRIVATE kalman kalman_main kalman_options kalman_print)
separate_arguments(TEST_COMMAND UNIX_COMMAND $ENV{COMMAND})
Expand Down Expand Up @@ -83,11 +78,6 @@ foreach(BACKEND IN ITEMS "eigen" "lazy" "naive")
"linalg_zero.cpp")
get_filename_component(NAME ${TEST} NAME_WE)
add_executable(kalman_test_${BACKEND}_${NAME}_driver ${TEST})
set_target_properties(
kalman_test_${BACKEND}_${NAME}_driver
PROPERTIES CXX_STANDARD 23
CXX_EXTENSIONS OFF
INTERPROCEDURAL_OPTIMIZATION TRUE)
target_link_libraries(
kalman_test_${BACKEND}_${NAME}_driver
PRIVATE kalman kalman_main kalman_linalg_${BACKEND} kalman_options)
Expand Down Expand Up @@ -115,8 +105,6 @@ foreach(BACKEND IN ITEMS "eigen")
"kalman_h_5x4x3.cpp")
get_filename_component(NAME ${TEST} NAME_WE)
add_executable(kalman_test_${BACKEND}_${NAME}_driver ${TEST})
set_target_properties(kalman_test_${BACKEND}_${NAME}_driver
PROPERTIES CXX_STANDARD 23 CXX_EXTENSIONS OFF)
target_link_libraries(
kalman_test_${BACKEND}_${NAME}_driver
PRIVATE kalman kalman_main kalman_linalg_${BACKEND} kalman_options)
Expand All @@ -131,8 +119,6 @@ foreach(BACKEND IN ITEMS "lazy")
foreach(TEST "linalg_constructor_initializer_lists_deduction.cpp")
get_filename_component(NAME ${TEST} NAME_WE)
add_executable(kalman_test_${BACKEND}_${NAME}_driver ${TEST})
set_target_properties(kalman_test_${BACKEND}_${NAME}_driver
PROPERTIES CXX_STANDARD 23 CXX_EXTENSIONS OFF)
target_link_libraries(
kalman_test_${BACKEND}_${NAME}_driver
PRIVATE kalman kalman_main kalman_linalg_${BACKEND} kalman_options)
Expand Down

0 comments on commit b8f2475

Please sign in to comment.