Commit 1849735f authored by Victor Zverovich's avatar Victor Zverovich

Fallback to c++11 if c++14 not available

parent 3239c518
...@@ -40,6 +40,17 @@ if (FMT_USE_CPP14) ...@@ -40,6 +40,17 @@ if (FMT_USE_CPP14)
check_cxx_compiler_flag(-std=c++1y HAVE_STD_CPP1Y_FLAG) check_cxx_compiler_flag(-std=c++1y HAVE_STD_CPP1Y_FLAG)
if (HAVE_STD_CPP1Y_FLAG) if (HAVE_STD_CPP1Y_FLAG)
set(CPP14_FLAG -std=c++1y) set(CPP14_FLAG -std=c++1y)
else ()
# Fallback on c++11 if c++14 is not available.
check_cxx_compiler_flag(-std=c++11 HAVE_STD_CPP11_FLAG)
if (HAVE_STD_CPP11_FLAG)
set(CPP14_FLAG -std=c++11)
else ()
check_cxx_compiler_flag(-std=c++0x HAVE_STD_CPP11_FLAG)
if (HAVE_STD_CPP0X_FLAG)
set(CPP14_FLAG -std=c++0x)
endif ()
endif ()
endif () endif ()
endif () endif ()
endif () endif ()
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment