diff --git a/CMakeLists.txt b/CMakeLists.txt index 105c98f8..75990b81 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -99,7 +99,13 @@ check_cxx_source_compiles(" template struct S { typedef typename S::type type; }; int main() {}" FMT_VARIADIC_TEMPLATES) -if (NOT FMT_VARIADIC_TEMPLATES) + +# Check if initializer lists are supported. +check_cxx_source_compiles(" + #include + int main() {}" FMT_INITIALIZER_LIST) + +if (NOT FMT_VARIADIC_TEMPLATES OR NOT FMT_INITIALIZER_LIST) add_definitions(-DGTEST_LANG_CXX11=0) endif ()