Make the function2 dependency available when not building the unit-tests

This commit is contained in:
Denis Blank 2017-03-04 13:59:07 +01:00
parent 22d7404970
commit 05a4ab7e11
2 changed files with 8 additions and 2 deletions

View File

@ -5,6 +5,12 @@ project(continuable C CXX)
set(THREADS_PREFER_PTHREAD_FLAG ON)
find_package(Threads REQUIRED)
if (CMAKE_CURRENT_SOURCE_DIR STREQUAL CMAKE_SOURCE_DIR)
set(CONTINUABLE_UNIT_TESTS ON)
endif()
add_subdirectory(dep)
# continuable-base
add_library(continuable-base INTERFACE)
@ -52,7 +58,7 @@ if (CMAKE_CURRENT_SOURCE_DIR STREQUAL CMAKE_SOURCE_DIR)
include(cmake/CMakeLists.txt)
add_subdirectory(dep)
add_subdirectory(examples)
add_subdirectory(test)
endif ()

View File

@ -1,4 +1,4 @@
if(NOT TARGET gtest)
if(CONTINUABLE_UNIT_TESTS AND NOT TARGET gtest)
add_subdirectory(googletest)
endif()