forked from microsoft/GSL
-
Notifications
You must be signed in to change notification settings - Fork 1
Open
Labels
Description
The CMAKE file lets think that we can compile with C++11, but GSL is a C++14 library.
include(CheckCXXCompilerFlag)
CHECK_CXX_COMPILER_FLAG("-std=c++14" COMPILER_SUPPORTS_CXX14)
CHECK_CXX_COMPILER_FLAG("-std=c++11" COMPILER_SUPPORTS_CXX11)
if(COMPILER_SUPPORTS_CXX14)
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=c++14 -Wall -Wno-missing-braces")
elseif(COMPILER_SUPPORTS_CXX11)
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=c++11 -Wall -Wno-missing-braces")
else()
message(STATUS "The compiler ${CMAKE_CXX_COMPILER} has no C++11 support. Please use a different C++ compiler.")
endif()
In addition the CMake file forces the C++ version depending on the compiler ability.
I don't know how to force the compilation with c++1z or even C++11, other than hacking the CMake file.
Any help here will be welcome.
It is up to the user to choose with which compiler and with which version the GSL library must be compiled.
Reactions are currently unavailable