diff options
author | Paul Thomson <paulthomson@users.noreply.github.com> | 2020-06-04 16:15:33 +0300 |
---|---|---|
committer | GitHub <noreply@github.com> | 2020-06-04 16:15:33 +0300 |
commit | 74130f2d3ab1b97c9fc042d8e7822a362a4cadb6 (patch) | |
tree | 338b42da2c21652fa8d0b25defa39f04bb4af78e /external | |
parent | 636f449e1529a10d259eb7dc37d97192cf2820f8 (diff) |
Fix googletest inclusion (#3398)
The googletest root CMakeLists.txt now sets a GOOGLETEST_VERSION variable, which is needed by the subprojects. Use add_subdirectory(external/googletest EXCLUDE_FROM_ALL) to add the root CMakeLists.txt file, which by default builds GMock. We already use EXCLUDE_FROM_ALL, which should shield us from e.g. building their tests, etc. If this causes issues in the future, we can change the googletest CMakeLists.txt file to only mess with compiler settings etc. if it is the root build.
Diffstat (limited to 'external')
-rw-r--r-- | external/CMakeLists.txt | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/external/CMakeLists.txt b/external/CMakeLists.txt index 56dd54fe6..5b341598c 100644 --- a/external/CMakeLists.txt +++ b/external/CMakeLists.txt @@ -47,7 +47,7 @@ if (NOT ${SPIRV_SKIP_TESTS}) if (TARGET gmock) message(STATUS "Google Mock already configured") else() - set(GMOCK_DIR ${CMAKE_CURRENT_SOURCE_DIR}/googletest/googlemock) + set(GMOCK_DIR ${CMAKE_CURRENT_SOURCE_DIR}/googletest) if(EXISTS ${GMOCK_DIR}) if(MSVC) # Our tests use ::testing::Combine. Work around a compiler |