mirror of
https://github.com/KhronosGroup/SPIRV-Tools
synced 2024-11-21 19:20:07 +00:00
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.
This commit is contained in:
parent
636f449e15
commit
74130f2d3a
2
external/CMakeLists.txt
vendored
2
external/CMakeLists.txt
vendored
@ -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
|
||||
|
Loading…
Reference in New Issue
Block a user