From b6f2391f0bef5d68721981bbb1665c8676237448 Mon Sep 17 00:00:00 2001 From: Martin Brodbeck Date: Wed, 11 Jul 2018 16:08:36 +0200 Subject: [PATCH] Only build tests when in debug mode --- CMakeLists.txt | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index c53101c..956f6c7 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -17,8 +17,11 @@ set(CMAKE_RUNTIME_OUTPUT_DIRECTORY ${CMAKE_BINARY_DIR}/bin) set(CMAKE_LIBRARY_OUTPUT_DIRECTORY ${CMAKE_BINARY_DIR}/lib) set(CMAKE_ARCHIVE_OUTPUT_DIRECTORY ${CMAKE_BINARY_DIR}/lib) -include(CTest) -enable_testing() - add_subdirectory(src) -add_subdirectory(test) + +if(CMAKE_BUILD_TYPE MATCHES Debug) + include(CTest) + enable_testing() + add_subdirectory(test) +endif() +