Skip to content

Commit f878043

Browse files
PhilMillerjbeder
authored andcommitted
Don't install embedded copy of GTest
Goole Test itself documents the `INSTALL_GTEST` option as something that projects embedding it should set to `OFF`. Leaving it on means that projects downstream from libraries that embed it are likely to encounter conflicting copies. This is particularly annoying because GTest does not maintain anything like a stable API, and so causes builds to fail if include paths pick up an inappropriately installed copy ahead of the one that the code wanted. Fixes #488
1 parent 9ce5a25 commit f878043

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

test/CMakeLists.txt

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@ find_package(Threads REQUIRED)
22

33
set(gtest_force_shared_crt ON CACHE BOOL "" FORCE)
44
set(BUILD_MOCK ON CACHE BOOL "" FORCE)
5+
set(INSTALL_GTEST OFF CACHE BOOL "" FORCE)
56
set(CMAKE_POLICY_DEFAULT_CMP0048 NEW)
67

78
if(YAML_USE_SYSTEM_GTEST)

0 commit comments

Comments
 (0)