mirror of
https://github.com/fmtlib/fmt.git
synced 2024-12-24 12:14:26 +00:00
Check if variadic templates are working
This commit is contained in:
parent
6a98f42336
commit
a734f67978
@ -86,6 +86,16 @@ add_library(gmock gmock/gmock-gtest-all.cc)
|
|||||||
find_package(Threads)
|
find_package(Threads)
|
||||||
target_link_libraries(gmock ${CMAKE_THREAD_LIBS_INIT})
|
target_link_libraries(gmock ${CMAKE_THREAD_LIBS_INIT})
|
||||||
|
|
||||||
|
# Check if variadic templates are working and not affected by GCC bug 39653:
|
||||||
|
# https://gcc.gnu.org/bugzilla/show_bug.cgi?id=39653
|
||||||
|
check_cxx_source_compiles("
|
||||||
|
template <class T, class ...Types>
|
||||||
|
struct S { typedef typename S<Types...>::type type; };
|
||||||
|
int main() {}" FMT_VARIADIC_TEMPLATES)
|
||||||
|
if (NOT FMT_VARIADIC_TEMPLATES)
|
||||||
|
target_compile_definitions(gmock PUBLIC GTEST_LANG_CXX11=0)
|
||||||
|
endif ()
|
||||||
|
|
||||||
# GTest doesn't detect <tuple> with clang.
|
# GTest doesn't detect <tuple> with clang.
|
||||||
if ("${CMAKE_CXX_COMPILER_ID}" STREQUAL "Clang")
|
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)
|
||||||
|
Loading…
Reference in New Issue
Block a user