mirror of
https://github.com/Naios/continuable.git
synced 2026-02-11 12:49:49 +08:00
back to c++11
This commit is contained in:
parent
1aeaf0240c
commit
7de4b7ba2e
@ -6,10 +6,10 @@ include(CheckCXXSourceRuns)
|
|||||||
include(CheckIncludeFiles)
|
include(CheckIncludeFiles)
|
||||||
|
|
||||||
if(MSVC)
|
if(MSVC)
|
||||||
if(${MSVC_VERSION} LESS 1900)
|
if(${MSVC_VERSION} LESS 1800)
|
||||||
message(FATAL_ERROR "You are using an unsupported version of Visual Studio "
|
message(FATAL_ERROR "You are using an unsupported version of Visual Studio "
|
||||||
"which doesn't support all required C++14 features. "
|
"which doesn't support all required C++11 features. "
|
||||||
"(Visual Studio 2015 (Version >= 1900) is required!)")
|
"(Visual Studio 2013 (Version >= 1800) is required!)")
|
||||||
|
|
||||||
message(STATUS "bad")
|
message(STATUS "bad")
|
||||||
endif()
|
endif()
|
||||||
@ -23,20 +23,20 @@ if(MSVC)
|
|||||||
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} /W4")
|
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} /W4")
|
||||||
|
|
||||||
else()
|
else()
|
||||||
# Check C++14 Compiler support.
|
# Check C++11 Compiler support.
|
||||||
CHECK_CXX_COMPILER_FLAG("-std=c++14" COMPILER_SUPPORTS_CXX14)
|
CHECK_CXX_COMPILER_FLAG("-std=c++11" COMPILER_SUPPORTS_CXX11)
|
||||||
|
|
||||||
if(NOT COMPILER_SUPPORTS_CXX14)
|
if(NOT COMPILER_SUPPORTS_CXX11)
|
||||||
# If not given try to enable C++1y
|
# If not given try to enable C++1y
|
||||||
CHECK_CXX_COMPILER_FLAG("-std=c++1y" COMPILER_SUPPORTS_CXX1Y)
|
CHECK_CXX_COMPILER_FLAG("-std=c++1y" COMPILER_SUPPORTS_CXX1Y)
|
||||||
|
|
||||||
if(NOT COMPILER_SUPPORTS_CXX1Y)
|
if(NOT COMPILER_SUPPORTS_CXX1Y)
|
||||||
message(FATAL_ERROR "Your compiler has no C++14 capability!")
|
message(FATAL_ERROR "Your compiler has no C++11 capability!")
|
||||||
else()
|
else()
|
||||||
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=c++1y")
|
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=c++1y")
|
||||||
endif()
|
endif()
|
||||||
else()
|
else()
|
||||||
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=c++14")
|
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=c++11")
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
# Enable full warnings
|
# Enable full warnings
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user