Don't use -std compiler flag if CMAKE_CXX_STANDARD is specified (#366)

(cherry picked from commit 12a6027b40)
This commit is contained in:
Victor Zverovich
2016-08-05 08:22:45 -07:00
committed by Jonathan Müller
parent f0a0674040
commit 7459ce15d3

View File

@ -37,6 +37,11 @@ if (FMT_USE_CPP11)
endif ()
endif ()
if (CMAKE_CXX_STANDARD)
# Don't use -std compiler flag if CMAKE_CXX_STANDARD is specified.
set(CPP11_FLAG )
endif ()
set(CMAKE_REQUIRED_FLAGS ${CPP11_FLAG})
# Check if variadic templates are working and not affected by GCC bug 39653: