diff options
author | David Neto <dneto@google.com> | 2017-12-11 11:30:08 -0500 |
---|---|---|
committer | David Neto <dneto@google.com> | 2017-12-11 11:30:08 -0500 |
commit | a1f020f2cfe8ebd4c1e2224cca17cd4baaf1a1bd (patch) | |
tree | 73addb9d43b0d9e1472e0373a73c69c49e4d7078 | |
parent | 4a6edb2f740b9b87b04306a7815f42de5ca149a4 (diff) | |
download | effcee-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.txt | 5 |
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) |