diff --git a/gtsam/base/CMakeLists.txt b/gtsam/base/CMakeLists.txt index bd2b5df96..b5c483017 100644 --- a/gtsam/base/CMakeLists.txt +++ b/gtsam/base/CMakeLists.txt @@ -7,9 +7,15 @@ set(base_local_libs base ) +# Files to exclude from compilation of tests and timing scripts +set(base_excluded_files +# "${CMAKE_CURRENT_SOURCE_DIR}/tests/testTypedDiscreteFactor.cpp" # Example of excluding a test + "" # Add to this list, with full path, to exclude +) + # Build tests if (GTSAM_BUILD_TESTS) - gtsam_add_tests(base "${base_local_libs}") + gtsam_add_subdir_tests(base "${base_local_libs}" "gtsam-static" "${base_excluded_files}") endif(GTSAM_BUILD_TESTS) # Build timing scripts diff --git a/gtsam/geometry/CMakeLists.txt b/gtsam/geometry/CMakeLists.txt index 8f1e8fb3a..07ebcc624 100644 --- a/gtsam/geometry/CMakeLists.txt +++ b/gtsam/geometry/CMakeLists.txt @@ -8,9 +8,15 @@ set(geometry_local_libs geometry ) +# Files to exclude from compilation of tests and timing scripts +set(geometry_excluded_files +# "${CMAKE_CURRENT_SOURCE_DIR}/tests/testTypedDiscreteFactor.cpp" # Example of excluding a test + "" # Add to this list, with full path, to exclude +) + # Build tests if (GTSAM_BUILD_TESTS) - gtsam_add_tests(geometry "${geometry_local_libs}") + gtsam_add_subdir_tests(geometry "${geometry_local_libs}" "gtsam-static" "${geometry_excluded_files}") endif(GTSAM_BUILD_TESTS) # Build timing scripts diff --git a/gtsam/inference/CMakeLists.txt b/gtsam/inference/CMakeLists.txt index c7006d698..897c03225 100644 --- a/gtsam/inference/CMakeLists.txt +++ b/gtsam/inference/CMakeLists.txt @@ -10,9 +10,15 @@ set(inference_local_libs ccolamd ) +# Files to exclude from compilation of tests and timing scripts +set(inference_excluded_files +# "${CMAKE_CURRENT_SOURCE_DIR}/tests/testTypedDiscreteFactor.cpp" # Example of excluding a test + "" # Add to this list, with full path, to exclude +) + # Build tests if (GTSAM_BUILD_TESTS) - gtsam_add_tests(inference "${inference_local_libs}") + gtsam_add_subdir_tests(inference "${inference_local_libs}" "gtsam-static" "${inference_excluded_files}") endif(GTSAM_BUILD_TESTS) # Build timing scripts diff --git a/gtsam/linear/CMakeLists.txt b/gtsam/linear/CMakeLists.txt index 02c300565..949a73abf 100644 --- a/gtsam/linear/CMakeLists.txt +++ b/gtsam/linear/CMakeLists.txt @@ -11,9 +11,15 @@ set(linear_local_libs ccolamd ) +# Files to exclude from compilation of tests and timing scripts +set(linear_excluded_files +# "${CMAKE_CURRENT_SOURCE_DIR}/tests/testTypedDiscreteFactor.cpp" # Example of excluding a test + "" # Add to this list, with full path, to exclude +) + # Build tests if (GTSAM_BUILD_TESTS) - gtsam_add_tests(linear "${linear_local_libs}") + gtsam_add_subdir_tests(linear "${linear_local_libs}" "gtsam-static" "${linear_excluded_files}") endif(GTSAM_BUILD_TESTS) # Build timing scripts diff --git a/gtsam/nonlinear/CMakeLists.txt b/gtsam/nonlinear/CMakeLists.txt index 69459e3d4..b70d59f2c 100644 --- a/gtsam/nonlinear/CMakeLists.txt +++ b/gtsam/nonlinear/CMakeLists.txt @@ -12,9 +12,15 @@ set(nonlinear_local_libs ccolamd ) +# Files to exclude from compilation of tests and timing scripts +set(nonlinear_excluded_files +# "${CMAKE_CURRENT_SOURCE_DIR}/tests/testTypedDiscreteFactor.cpp" # Example of excluding a test + "" # Add to this list, with full path, to exclude +) + # Build tests if (GTSAM_BUILD_TESTS) - gtsam_add_tests(nonlinear "${nonlinear_local_libs}") + gtsam_add_subdir_tests(nonlinear "${nonlinear_local_libs}" "gtsam-static" "${nonlinear_excluded_files}") endif(GTSAM_BUILD_TESTS) # Build timing scripts diff --git a/gtsam/slam/CMakeLists.txt b/gtsam/slam/CMakeLists.txt index 6c2ee61d5..68c3f6b80 100644 --- a/gtsam/slam/CMakeLists.txt +++ b/gtsam/slam/CMakeLists.txt @@ -13,9 +13,15 @@ set(slam_local_libs ccolamd ) +# Files to exclude from compilation of tests and timing scripts +set(slam_excluded_files +# "${CMAKE_CURRENT_SOURCE_DIR}/tests/testTypedDiscreteFactor.cpp" # Example of excluding a test + "" # Add to this list, with full path, to exclude +) + # Build tests if (GTSAM_BUILD_TESTS) - gtsam_add_tests(slam "${slam_local_libs}") + gtsam_add_subdir_tests(slam "${slam_local_libs}" "gtsam-static" "${slam_excluded_files}") endif(GTSAM_BUILD_TESTS) # Build timing scripts