Skip to content
Snippets Groups Projects
Commit 8d63aa95 authored by Peterson, Peter's avatar Peterson, Peter
Browse files

Move declaration of c++14 standard

parent 520396b2
No related branches found
No related tags found
No related merge requests found
...@@ -241,6 +241,12 @@ if ( ${CMAKE_SYSTEM_NAME} STREQUAL "Linux" ) ...@@ -241,6 +241,12 @@ if ( ${CMAKE_SYSTEM_NAME} STREQUAL "Linux" )
include ( LinuxSetup ) include ( LinuxSetup )
endif () endif ()
###########################################################################
# Set the c++ standard to 14 - cmake should do the right thing with msvc
###########################################################################
set(CMAKE_CXX_STANDARD 14)
set(CMAKE_CXX_STANDARD_REQUIRED ON)
########################################################################### ###########################################################################
# Add compiler options if using gcc # Add compiler options if using gcc
########################################################################### ###########################################################################
......
...@@ -96,10 +96,7 @@ if(WITH_UBSAN) ...@@ -96,10 +96,7 @@ if(WITH_UBSAN)
set(CMAKE_SHARED_LINKER_FLAGS "${CMAKE_SHARED_LINKER_FLAGS} ${SAN_FLAGS}" ) set(CMAKE_SHARED_LINKER_FLAGS "${CMAKE_SHARED_LINKER_FLAGS} ${SAN_FLAGS}" )
endif() endif()
set(CMAKE_CXX_STANDARD 14) # XCode isn't picking up the c++ standard by CMAKE_CXX_STANDARD
set(CMAKE_CXX_STANDARD_REQUIRED ON)
# XCode isn't picking up the standard set above.
if(CMAKE_GENERATOR STREQUAL Xcode) if(CMAKE_GENERATOR STREQUAL Xcode)
set ( CMAKE_XCODE_ATTRIBUTE_OTHER_CPLUSPLUSFLAGS "${GNUFLAGS} -Woverloaded-virtual -fno-operator-names") set ( CMAKE_XCODE_ATTRIBUTE_OTHER_CPLUSPLUSFLAGS "${GNUFLAGS} -Woverloaded-virtual -fno-operator-names")
set ( CMAKE_XCODE_ATTRIBUTE_CLANG_CXX_LANGUAGE_STANDARD "c++14") set ( CMAKE_XCODE_ATTRIBUTE_CLANG_CXX_LANGUAGE_STANDARD "c++14")
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment