Fix -std=c++11 flag
This commit is contained in:
parent
3bb00b7ead
commit
96824f11c6
@ -1,5 +1,10 @@
|
||||
cmake_minimum_required(VERSION 2.8.8)
|
||||
add_definitions(-std=c++11)
|
||||
|
||||
if (CMAKE_VERSION VERSION_LESS "3.1")
|
||||
add_definitions(-std=c++11)
|
||||
else()
|
||||
set(CMAKE_CXX_STANDARD 11)
|
||||
endif()
|
||||
|
||||
if (POLICY CMP0048)
|
||||
cmake_policy(SET CMP0048 NEW)
|
||||
|
@ -98,6 +98,10 @@ macro(config_compiler_and_linker)
|
||||
set(cxx_exception_flags "-EHsc -D_HAS_EXCEPTIONS=1")
|
||||
set(cxx_no_exception_flags "-EHs-c- -D_HAS_EXCEPTIONS=0")
|
||||
set(cxx_no_rtti_flags "-GR-")
|
||||
|
||||
if (${CMAKE_CXX_COMPILER_ID} STREQUAL "Clang")
|
||||
set(cxx_base_flags "${cxx_base_flags} -Wno-unknown-argument")
|
||||
endif()
|
||||
elseif (CMAKE_COMPILER_IS_GNUCXX)
|
||||
set(cxx_base_flags "-Wall -Wshadow -Werror")
|
||||
if(NOT CMAKE_CXX_COMPILER_VERSION VERSION_LESS 7.0.0)
|
||||
|
Loading…
Reference in New Issue
Block a user