Mentions légales du service

Skip to content
Snippets Groups Projects
Commit 72cf3eaa authored by hhakim's avatar hhakim
Browse files

Remove flag detection for outdated C++0x and make optional the success of that...

Remove flag detection for outdated C++0x and make optional the success of that of C++11 (the compiler should be up to date).

It fixes #274.
parent 07ec94a2
No related branches found
No related tags found
No related merge requests found
...@@ -479,15 +479,12 @@ set(CMAKE_CXX_FLAGS "") ...@@ -479,15 +479,12 @@ set(CMAKE_CXX_FLAGS "")
#Add the c++11 flag, whatever it is #Add the c++11 flag, whatever it is
include(CheckCXXCompilerFlag) include(CheckCXXCompilerFlag)
check_cxx_compiler_flag(-std=c++11 COMPILER_SUPPORTS_CXX11) check_cxx_compiler_flag(-std=c++11 COMPILER_SUPPORTS_CXX11)
check_cxx_compiler_flag(-std=c++0x COMPILER_SUPPORTS_CXX0X)
#set(CMAKE_CXX_FLAGS) #set(CMAKE_CXX_FLAGS)
if(COMPILER_SUPPORTS_CXX11) if(COMPILER_SUPPORTS_CXX11)
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=c++11" CACHE STRING "compile flags" FORCE) set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=c++11" CACHE STRING "compile flags" FORCE)
message(STATUS "C++ compiler supprt c++11") message(STATUS "C++ compiler supprt c++11")
elseif(COMPILER_SUPPORTS_CXX0X)
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=c++0x" CACHE STRING "compile flags" FORCE)
else() else()
message(FATAL_ERROR "The compiler ${CMAKE_CXX_COMPILER} has neither C++11 nor c++0x support.") message(STATUS "Failed to determine the compiler ${CMAKE_CXX_COMPILER} C++11 flag.")
endif() endif()
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment