allow gtest in a sibling directory for application builds

to facility build servers where we cannot use the network
This commit is contained in:
Arne Morten Kvarving
2016-01-29 13:35:57 +01:00
parent a07036c906
commit 4f070b6fdb

View File

@@ -95,6 +95,11 @@ if(IFEM_INTREE_BUILD)
include_directories(${IFEM_PATH}/3rdparty/gtest/include)
elseif(NOT IFEM_AS_SUBMODULE AND NOT IFEM_LIBRARY_BUILD
AND NOT TARGET gtest)
include(DownloadGTest)
include_directories(${GTEST_INCLUDE_DIRS})
if (EXISTS ${PROJECT_SOURCE_DIR}/../gtest)
add_subdirectory(${PROJECT_SOURCE_DIR}/../gtest gtest)
include_directories(${PROJECT_SOURCE_DIR}/../gtest/include)
else()
include(DownloadGTest)
include_directories(${GTEST_INCLUDE_DIRS})
endif()
endif()