diff options
author | Aina Niemetz <aina.niemetz@gmail.com> | 2018-08-20 18:39:10 -0700 |
---|---|---|
committer | Mathias Preiner <mathias.preiner@gmail.com> | 2018-09-22 16:30:59 -0700 |
commit | 1a0e1cb98d303b5bd927ed33973b7bcff2c0a605 (patch) | |
tree | db513a3a853ba36f6e5930538c78410b7cb1c26e /CMakeLists.txt | |
parent | ac1d915190a56328b3e33428deadc4a8b185d0a6 (diff) |
cmake: Build unit tests only if -DENABLE_UNIT_TESTING=ON.
Diffstat (limited to 'CMakeLists.txt')
-rw-r--r-- | CMakeLists.txt | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/CMakeLists.txt b/CMakeLists.txt index 1ed87951d..2898f9dff 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -226,6 +226,11 @@ elseif(CMAKE_BUILD_TYPE STREQUAL "Competition") endif() #-----------------------------------------------------------------------------# +# Enable the ctest testing framework + +enable_testing() + +#-----------------------------------------------------------------------------# if(ENABLE_ASAN) set(CMAKE_REQUIRED_LIBRARIES -fsanitize=address) @@ -293,7 +298,6 @@ endif() if(ENABLE_UNIT_TESTING) find_package(CxxTest REQUIRED) - enable_testing() # Force shared libs for unit tests, static libs with unit tests are not # working right now. set(ENABLE_SHARED ON) |