Better way to prevent googletest from installing
This commit is contained in:
parent
a5ee4d7bab
commit
44ea19d184
7
vendor/googletest/CMakeLists.txt
vendored
7
vendor/googletest/CMakeLists.txt
vendored
@ -1,14 +1,11 @@
|
|||||||
include(CTest)
|
include(CTest)
|
||||||
|
|
||||||
if (BUILD_TESTING)
|
if (BUILD_TESTING)
|
||||||
# When test cases are build, disable "make install", because this would also install gtest libraries.
|
add_subdirectory(gtest-1.8.0 EXCLUDE_FROM_ALL)
|
||||||
macro(install)
|
|
||||||
endmacro(install)
|
|
||||||
add_subdirectory(gtest-1.8.0)
|
|
||||||
|
|
||||||
project (googletest)
|
project (googletest)
|
||||||
add_library(${PROJECT_NAME} dummy.cpp)
|
add_library(${PROJECT_NAME} dummy.cpp)
|
||||||
target_link_libraries(${PROJECT_NAME} gtest gmock gmock_main)
|
target_link_libraries(${PROJECT_NAME} PRIVATE gtest gmock gmock_main)
|
||||||
target_include_directories(${PROJECT_NAME} SYSTEM INTERFACE ${gtest_INCLUDE_DIRS}/include SYSTEM ${gmock_INCLUDE_DIRS}/include)
|
target_include_directories(${PROJECT_NAME} SYSTEM INTERFACE ${gtest_INCLUDE_DIRS}/include SYSTEM ${gmock_INCLUDE_DIRS}/include)
|
||||||
|
|
||||||
# Disable "missing override" warning because gmock MOCK_METHOD() don't use override :(
|
# Disable "missing override" warning because gmock MOCK_METHOD() don't use override :(
|
||||||
|
Loading…
x
Reference in New Issue
Block a user