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 ()