Fallback to c++11 if c++14 not available
This commit is contained in:
parent
3239c51814
commit
1849735f12
@ -40,6 +40,17 @@ if (FMT_USE_CPP14)
|
||||
check_cxx_compiler_flag(-std=c++1y HAVE_STD_CPP1Y_FLAG)
|
||||
if (HAVE_STD_CPP1Y_FLAG)
|
||||
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 ()
|
||||
|
Loading…
Reference in New Issue
Block a user