diff options
author | David Neto <dneto@google.com> | 2017-12-11 13:27:25 -0500 |
---|---|---|
committer | David Neto <dneto@google.com> | 2017-12-11 13:28:54 -0500 |
commit | 90466a4e48690241df57a6896afba7fe367110d0 (patch) | |
tree | 13cc0f0fdf123a0462d2d8f9d2b9c8e6f2a70e22 | |
parent | 847773f3d4dd71dc64a73613df5587c3e0f38030 (diff) | |
download | effcee-90466a4e48690241df57a6896afba7fe367110d0.tar.gz |
Move ::testing::Combine workaround to top
The fix must be visible to compilation in the effcee/ tree
as well.
-rw-r--r-- | CMakeLists.txt | 6 | ||||
-rw-r--r-- | third_party/CMakeLists.txt | 5 |
2 files changed, 6 insertions, 5 deletions
diff --git a/CMakeLists.txt b/CMakeLists.txt index fcae553..3a2e1b0 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -5,6 +5,12 @@ enable_testing() option(EFFCEE_BUILD_TESTING "Enable testing for Effcee" ON) if(${EFFCEE_BUILD_TESTING}) message(STATUS "Configuring Effcee to build tests.") + if(MSVC) + # 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) + endif(MSVC) else() message(STATUS "Configuring Effcee to avoid building tests.") endif() diff --git a/third_party/CMakeLists.txt b/third_party/CMakeLists.txt index c89ff91..4137510 100644 --- a/third_party/CMakeLists.txt +++ b/third_party/CMakeLists.txt @@ -24,11 +24,6 @@ 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) |