Allow tests to be ignored (#12)
This commit is contained in:
Родитель
51683d39e8
Коммит
9341d49813
|
@ -5,11 +5,13 @@ project(tracelogging)
|
|||
include(GNUInstallDirs)
|
||||
|
||||
add_compile_options(-Wall -Wextra -Werror)
|
||||
set(TRACELOGGING_BUILD_TESTS ON CACHE BOOL "Build tests.")
|
||||
|
||||
# Include source
|
||||
add_subdirectory(src)
|
||||
|
||||
# Only include testing stuff if we are the top level
|
||||
if(TRACELOGGING_BUILD_TESTS)
|
||||
if (${CMAKE_PROJECT_NAME} STREQUAL ${PROJECT_NAME})
|
||||
enable_testing()
|
||||
|
||||
|
@ -20,3 +22,4 @@ if (${CMAKE_PROJECT_NAME} STREQUAL ${PROJECT_NAME})
|
|||
|
||||
add_subdirectory(test)
|
||||
endif ()
|
||||
endif ()
|
||||
|
|
Загрузка…
Ссылка в новой задаче