src: Extract test CMake setup to separate file
This commit is contained in:
parent
01b97d0c2a
commit
acc54de922
|
@ -24,14 +24,14 @@ if (BARRIER_USE_EXTERNAL_GTEST)
|
||||||
)
|
)
|
||||||
else()
|
else()
|
||||||
include_directories(
|
include_directories(
|
||||||
../../ext/gtest
|
../ext/gtest
|
||||||
../../ext/gtest/include
|
../ext/gtest/include
|
||||||
../../ext/gmock
|
../ext/gmock
|
||||||
../../ext/gmock/include
|
../ext/gmock/include
|
||||||
)
|
)
|
||||||
|
|
||||||
add_library(gtest STATIC ../../ext/gtest/src/gtest-all.cc)
|
add_library(gtest STATIC ../ext/gtest/src/gtest-all.cc)
|
||||||
add_library(gmock STATIC ../../ext/gmock/src/gmock-all.cc)
|
add_library(gmock STATIC ../ext/gmock/src/gmock-all.cc)
|
||||||
|
|
||||||
set(GTEST_LIBRARIES gtest)
|
set(GTEST_LIBRARIES gtest)
|
||||||
set(GMOCK_LIBRARIES gmock)
|
set(GMOCK_LIBRARIES gmock)
|
||||||
|
@ -42,6 +42,3 @@ else()
|
||||||
set_target_properties(gmock PROPERTIES COMPILE_FLAGS "-w")
|
set_target_properties(gmock PROPERTIES COMPILE_FLAGS "-w")
|
||||||
endif()
|
endif()
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
add_subdirectory(integtests)
|
|
||||||
add_subdirectory(unittests)
|
|
|
@ -20,8 +20,11 @@ include_directories (${CMAKE_CURRENT_BINARY_DIR}/lib)
|
||||||
add_subdirectory(lib)
|
add_subdirectory(lib)
|
||||||
add_subdirectory(cmd)
|
add_subdirectory(cmd)
|
||||||
|
|
||||||
|
include(../cmake/gtest.cmake)
|
||||||
|
|
||||||
if (BARRIER_BUILD_TESTS)
|
if (BARRIER_BUILD_TESTS)
|
||||||
add_subdirectory(test)
|
add_subdirectory(test/integtests)
|
||||||
|
add_subdirectory(test/unittests)
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
if (BARRIER_BUILD_GUI)
|
if (BARRIER_BUILD_GUI)
|
||||||
|
|
Loading…
Reference in New Issue