diff --git a/CMakeLists.txt b/CMakeLists.txt index 7c9cd9c3..fa64ac1a 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -152,8 +152,12 @@ endif () # add_definitions(-DFMT_USE_STATIC_ASSERT=1) #endif () +check_cxx_source_compiles(" + #include + int main(){ std::tuple t; }" FMT_TUPLE) + # GTest doesn't detect with clang. -if (CMAKE_CXX_COMPILER_ID STREQUAL "Clang" OR MSVC) +if (CMAKE_CXX_COMPILER_ID STREQUAL "Clang" OR NOT FMT_TUPLE) target_compile_definitions(gmock PUBLIC GTEST_USE_OWN_TR1_TUPLE=1) endif ()