From 4df5d10e3c350cb39609732c807fb5e0af6d727e Mon Sep 17 00:00:00 2001 From: Victor Zverovich Date: Sun, 1 Mar 2015 14:14:06 -0800 Subject: [PATCH] Check if initializer lists are supported --- CMakeLists.txt | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) 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 ()