2016-02-11 17:34:08 +01:00
|
|
|
include(CTest)
|
2016-02-11 14:01:59 +01:00
|
|
|
|
2016-02-11 17:34:08 +01:00
|
|
|
if (BUILD_TESTING)
|
2016-02-14 17:01:24 +01:00
|
|
|
# When test cases are build, disable "make install", because this would also install gtest libraries.
|
|
|
|
macro(install)
|
|
|
|
endmacro(install)
|
2017-01-08 19:51:01 +01:00
|
|
|
add_subdirectory(gtest-1.8.0)
|
2016-02-11 17:34:08 +01:00
|
|
|
|
|
|
|
project (googletest)
|
|
|
|
add_library(${PROJECT_NAME} dummy.cpp)
|
|
|
|
target_link_libraries(${PROJECT_NAME} gtest gmock gmock_main)
|
|
|
|
target_include_directories(${PROJECT_NAME} SYSTEM INTERFACE ${gtest_INCLUDE_DIRS}/include SYSTEM ${gmock_INCLUDE_DIRS}/include)
|
|
|
|
endif (BUILD_TESTING)
|