mirror of
https://github.com/fmtlib/fmt.git
synced 2024-10-06 06:50:00 +00:00
Workaround a bug in implementation of variadic templates in MSVC11
This commit is contained in:
parent
cea64132a2
commit
0963fd0a4d
@ -152,12 +152,13 @@ endif ()
|
|||||||
# add_definitions(-DFMT_USE_STATIC_ASSERT=1)
|
# add_definitions(-DFMT_USE_STATIC_ASSERT=1)
|
||||||
#endif ()
|
#endif ()
|
||||||
|
|
||||||
check_cxx_source_compiles("
|
# Workaround a bug in implementation of variadic templates in MSVC11.
|
||||||
#include <tuple>
|
if (MSVC)
|
||||||
int main(){ std::tuple<int, double> t; }" FMT_TUPLE)
|
target_compile_definitions(gmock PUBLIC _VARIADIC_MAX=10)
|
||||||
|
endif ()
|
||||||
|
|
||||||
# GTest doesn't detect <tuple> with clang.
|
# GTest doesn't detect <tuple> with clang.
|
||||||
if (CMAKE_CXX_COMPILER_ID STREQUAL "Clang" OR NOT FMT_TUPLE)
|
if (CMAKE_CXX_COMPILER_ID STREQUAL "Clang")
|
||||||
target_compile_definitions(gmock PUBLIC GTEST_USE_OWN_TR1_TUPLE=1)
|
target_compile_definitions(gmock PUBLIC GTEST_USE_OWN_TR1_TUPLE=1)
|
||||||
endif ()
|
endif ()
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user