diff --git a/gtsam/slam/CMakeLists.txt b/gtsam/slam/CMakeLists.txt index 768ab2307..c25e32bd4 100644 --- a/gtsam/slam/CMakeLists.txt +++ b/gtsam/slam/CMakeLists.txt @@ -24,10 +24,6 @@ if (GTSAM_BUILD_TESTS) gtsam_add_subdir_tests(slam "${slam_local_libs}" "gtsam-static" "${slam_excluded_files}") endif(GTSAM_BUILD_TESTS) -if(MSVC) - add_definitions("/bigobj") -endif() - # Build timing scripts if (GTSAM_BUILD_TIMING) gtsam_add_subdir_timing(slam "${slam_local_libs}" "gtsam-static" "${slam_excluded_files}") diff --git a/tests/CMakeLists.txt b/tests/CMakeLists.txt index 9e4c501d4..213d2f5e9 100644 --- a/tests/CMakeLists.txt +++ b/tests/CMakeLists.txt @@ -25,6 +25,10 @@ set (tests_exclude #"${CMAKE_CURRENT_SOURCE_DIR}/testOccupancyGrid.cpp" ) +if(MSVC) + add_definitions("/bigobj") # testSerializationSLAM needs this +endif() + # Build tests if (GTSAM_BUILD_TESTS) # Subdirectory target for tests