libcryfs/vendor/googletest/CMakeLists.txt
0x4D616E75 1a2036749c Remove usage of old behavior from cmake 2.8 policy (#217)
* fix linking of fuse in cryfs-cli, linking of cpp-utils in cryfs tests and remove cmake policy to use behaviors of cmake 2.8 instead of 3.0

* setting link dependencies in cryfs project to public, remove transitive dependencies from cryfs-cli project and cryfs test project

* set gtest and gmock link dependencies from private to public in googletest project
2018-05-20 15:13:49 -07:00

15 lines
597 B
CMake

include(CTest)
if (BUILD_TESTING)
add_subdirectory(gtest-1.8.0 EXCLUDE_FROM_ALL)
project (googletest)
add_library(${PROJECT_NAME} dummy.cpp)
target_link_libraries(${PROJECT_NAME} PUBLIC gtest gmock)
target_link_libraries(${PROJECT_NAME} PRIVATE gmock_main)
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 :(
target_compile_options(${PROJECT_NAME} PUBLIC "-Wno-inconsistent-missing-override")
endif (BUILD_TESTING)