@@ -80,13 +80,13 @@ enable_testing()
80
80
if (CMAKE_COMPILER_IS_GNUCC)
81
81
execute_process (COMMAND ${CMAKE_C_COMPILER} -dumpversion OUTPUT_VARIABLE GCC_VERSION)
82
82
83
- if (GCC_VERSION VERSION_LESS 4.8 )
84
- set (CPP11_FLAG "-std=c++0x " )
83
+ if (GCC_VERSION VERSION_LESS 5.0 )
84
+ set (CPP14_FLAG "-std=c++1y " )
85
85
else ()
86
- set (CPP11_FLAG "-std=c++11 " )
86
+ set (CPP14_FLAG "-std=c++14 " )
87
87
endif ()
88
88
else ()
89
- set (CPP11_FLAG "-std=c++11 " )
89
+ set (CPP14_FLAG "-std=c++14 " )
90
90
endif ()
91
91
92
92
if (MSVC )
@@ -101,7 +101,7 @@ if(MSVC)
101
101
# how to workaround or fix the error. So I'm disabling it globally.
102
102
add_definitions (/wd4503)
103
103
else ()
104
- add_definitions (-Wall -Wextra -Wshadow -Wnon-virtual-dtor -Wold-style-cast -Wcast-align -Wcast-qual -Wunused -Woverloaded-virtual -pedantic ${CPP11_FLAG } )
104
+ add_definitions (-Wall -Wextra -Wshadow -Wnon-virtual-dtor -Wold-style-cast -Wcast-align -Wcast-qual -Wunused -Woverloaded-virtual -pedantic ${CPP14_FLAG } )
105
105
106
106
if ("${CMAKE_CXX_COMPILER_ID} " STREQUAL "Clang" )
107
107
add_definitions (-Weverything -Wno-c++98-compat -Wno-documentation -Wno-switch-enum -Wno-weak-vtables -Wno-sign-conversion -Wno-missing-prototypes -Wno-padded -Wno-missing-noreturn)
@@ -119,12 +119,12 @@ if("${CMAKE_CXX_COMPILER_ID}" STREQUAL "Clang")
119
119
120
120
if (USE_LIBCXX)
121
121
add_definitions (-stdlib=libc++)
122
- set (LINKER_FLAGS "${LINKER_FLAGS} ${CPP11_FLAG } -stdlib=libc++" )
122
+ set (LINKER_FLAGS "${LINKER_FLAGS} ${CPP14_FLAG } -stdlib=libc++" )
123
123
else ()
124
- set (LINKER_FLAGS "${LINKER_FLAGS} ${CPP11_FLAG } " )
124
+ set (LINKER_FLAGS "${LINKER_FLAGS} ${CPP14_FLAG } " )
125
125
endif ()
126
126
elseif (CMAKE_COMPILER_IS_GNUCC)
127
- set (LINKER_FLAGS "${LINKER_FLAGS} ${CPP11_FLAG } " )
127
+ set (LINKER_FLAGS "${LINKER_FLAGS} ${CPP14_FLAG } " )
128
128
endif ()
129
129
130
130
# limitations in MinGW require us to make an optimized build
0 commit comments