This commit is contained in:
Sinan Kaya 2019-08-08 02:01:54 -04:00 коммит произвёл Nick Bopp
Родитель 51683d39e8
Коммит 9341d49813
1 изменённых файлов: 10 добавлений и 7 удалений

Просмотреть файл

@ -5,18 +5,21 @@ 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 (${CMAKE_PROJECT_NAME} STREQUAL ${PROJECT_NAME})
enable_testing()
if(TRACELOGGING_BUILD_TESTS)
if (${CMAKE_PROJECT_NAME} STREQUAL ${PROJECT_NAME})
enable_testing()
if (NOT TARGET Catch2::Catch2)
list(APPEND CMAKE_MODULE_PATH "${CMAKE_CURRENT_LIST_DIR}/external/Catch2/contrib")
add_subdirectory(external/Catch2)
if (NOT TARGET Catch2::Catch2)
list(APPEND CMAKE_MODULE_PATH "${CMAKE_CURRENT_LIST_DIR}/external/Catch2/contrib")
add_subdirectory(external/Catch2)
endif ()
add_subdirectory(test)
endif ()
add_subdirectory(test)
endif ()