From 5517c8962e259b4993fb0d5fd56b563e752def3e Mon Sep 17 00:00:00 2001 From: vitaut Date: Tue, 12 May 2015 07:13:12 -0700 Subject: [PATCH] Use -std=gnu++11 if -std=c++11 is broken (for MinGW) --- CMakeLists.txt | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/CMakeLists.txt b/CMakeLists.txt index 4276ad93..348b302d 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -34,6 +34,11 @@ if (HAVE_STD_CPP11_FLAG) int main() {}" FMT_CPP11_UNISTD_H) if (FMT_CPP11_CMATH AND FMT_CPP11_UNISTD_H) set(CPP11_FLAG -std=c++11) + else () + check_cxx_compiler_flag(-std=gnu++11 HAVE_STD_GNUPP11_FLAG) + if (HAVE_STD_CPP11_FLAG) + set(CPP11_FLAG -std=gnu++11) + endif () endif () set(CMAKE_REQUIRED_FLAGS ) else ()