Only build tests when in debug mode

This commit is contained in:
Martin Brodbeck 2018-07-11 16:08:36 +02:00
parent b2650fad26
commit b6f2391f0b

View file

@ -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()