aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDavid Neto <dneto@google.com>2017-12-11 11:30:08 -0500
committerDavid Neto <dneto@google.com>2017-12-11 11:30:08 -0500
commita1f020f2cfe8ebd4c1e2224cca17cd4baaf1a1bd (patch)
tree73addb9d43b0d9e1472e0373a73c69c49e4d7078
parent4a6edb2f740b9b87b04306a7815f42de5ca149a4 (diff)
downloadeffcee-a1f020f2cfe8ebd4c1e2224cca17cd4baaf1a1bd.tar.gz
If tests enabled, define GTEST_HAS_COMBINE=1
Our tests use ::testing::Combine from googletest. We only care to run in the environments where that is available, i.e. all reasonably new compilers and runtimes. Work around the accidental disabling of ::testing::Combine in VS 2017. See https://github.com/google/googletest/issues/1352
-rw-r--r--third_party/CMakeLists.txt5
1 files changed, 5 insertions, 0 deletions
diff --git a/third_party/CMakeLists.txt b/third_party/CMakeLists.txt
index 4137510..c89ff91 100644
--- a/third_party/CMakeLists.txt
+++ b/third_party/CMakeLists.txt
@@ -24,6 +24,11 @@ endif()
# Configure third party projects.
if(EFFCEE_BUILD_TESTING)
+ # Our tests use ::testing::Combine. Force the ability to use it, working
+ # around googletest's possibly faulty compiler detection logic.
+ # See https://github.com/google/googletest/issues/1352
+ add_definitions(-DGTEST_HAS_COMBINE=1)
+
if (NOT TARGET gmock)
if (IS_DIRECTORY ${EFFCEE_GOOGLETEST_DIR})
add_subdirectory(${EFFCEE_GOOGLETEST_DIR} googletest)