From 085d01580e5c04b1f005fc70c5c58ffb87027ba3 Mon Sep 17 00:00:00 2001 From: Varun Agrawal Date: Sun, 27 Dec 2020 19:13:41 -0500 Subject: [PATCH] minor formatting of cmake file --- cmake/GtsamTesting.cmake | 54 ++++++++++++++++++++-------------------- 1 file changed, 27 insertions(+), 27 deletions(-) diff --git a/cmake/GtsamTesting.cmake b/cmake/GtsamTesting.cmake index 3b42ffa215..573fb696ac 100644 --- a/cmake/GtsamTesting.cmake +++ b/cmake/GtsamTesting.cmake @@ -88,36 +88,36 @@ enable_testing() option(GTSAM_BUILD_TESTS "Enable/Disable building of tests" ON) option(GTSAM_BUILD_EXAMPLES_ALWAYS "Build examples with 'make all' (build with 'make examples' if not)" ON) - option(GTSAM_BUILD_TIMING_ALWAYS "Build timing scripts with 'make all' (build with 'make timing' if not" OFF) - - # Add option for combining unit tests - if(MSVC OR XCODE_VERSION) - option(GTSAM_SINGLE_TEST_EXE "Combine unit tests into single executable (faster compile)" ON) - else() - option(GTSAM_SINGLE_TEST_EXE "Combine unit tests into single executable (faster compile)" OFF) - endif() - mark_as_advanced(GTSAM_SINGLE_TEST_EXE) - - # Enable make check (http://www.cmake.org/Wiki/CMakeEmulateMakeCheck) - if(GTSAM_BUILD_TESTS) - add_custom_target(check COMMAND ${CMAKE_CTEST_COMMAND} -C $ --output-on-failure) - # Also add alternative checks using valgrind. - # We don't look for valgrind being installed in the system, since these - # targets are not invoked unless directly instructed by the user. - if (UNIX) - # Run all tests using valgrind: - add_custom_target(check_valgrind) - endif() +option(GTSAM_BUILD_TIMING_ALWAYS "Build timing scripts with 'make all' (build with 'make timing' if not" OFF) + +# Add option for combining unit tests +if(MSVC OR XCODE_VERSION) + option(GTSAM_SINGLE_TEST_EXE "Combine unit tests into single executable (faster compile)" ON) +else() + option(GTSAM_SINGLE_TEST_EXE "Combine unit tests into single executable (faster compile)" OFF) +endif() +mark_as_advanced(GTSAM_SINGLE_TEST_EXE) + +# Enable make check (http://www.cmake.org/Wiki/CMakeEmulateMakeCheck) +if(GTSAM_BUILD_TESTS) + add_custom_target(check COMMAND ${CMAKE_CTEST_COMMAND} -C $ --output-on-failure) + # Also add alternative checks using valgrind. + # We don't look for valgrind being installed in the system, since these + # targets are not invoked unless directly instructed by the user. + if (UNIX) + # Run all tests using valgrind: + add_custom_target(check_valgrind) + endif() - # Add target to build tests without running - add_custom_target(all.tests) - endif() + # Add target to build tests without running + add_custom_target(all.tests) +endif() - # Add examples target - add_custom_target(examples) +# Add examples target +add_custom_target(examples) - # Add timing target - add_custom_target(timing) +# Add timing target +add_custom_target(timing) # Implementations of this file's macros: