@@ -80,13 +80,13 @@ enable_testing()
8080if (CMAKE_COMPILER_IS_GNUCC)
8181 execute_process (COMMAND ${CMAKE_C_COMPILER} -dumpversion OUTPUT_VARIABLE GCC_VERSION )
8282
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 " )
8585 else ()
86- set (CPP11_FLAG "-std=c++11 " )
86+ set (CPP14_FLAG "-std=c++14 " )
8787 endif ()
8888else ()
89- set (CPP11_FLAG "-std=c++11 " )
89+ set (CPP14_FLAG "-std=c++14 " )
9090endif ()
9191
9292if (MSVC )
@@ -101,7 +101,7 @@ if(MSVC)
101101 # how to workaround or fix the error. So I'm disabling it globally.
102102 add_definitions (/wd4503 )
103103else ()
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 } )
105105
106106 if ("${CMAKE_CXX_COMPILER_ID} " STREQUAL "Clang" )
107107 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")
119119
120120 if (USE_LIBCXX)
121121 add_definitions (-stdlib=libc++ )
122- set (LINKER_FLAGS "${LINKER_FLAGS} ${CPP11_FLAG } -stdlib=libc++" )
122+ set (LINKER_FLAGS "${LINKER_FLAGS} ${CPP14_FLAG } -stdlib=libc++" )
123123 else ()
124- set (LINKER_FLAGS "${LINKER_FLAGS} ${CPP11_FLAG } " )
124+ set (LINKER_FLAGS "${LINKER_FLAGS} ${CPP14_FLAG } " )
125125 endif ()
126126elseif (CMAKE_COMPILER_IS_GNUCC)
127- set (LINKER_FLAGS "${LINKER_FLAGS} ${CPP11_FLAG } " )
127+ set (LINKER_FLAGS "${LINKER_FLAGS} ${CPP14_FLAG } " )
128128endif ()
129129
130130# limitations in MinGW require us to make an optimized build
0 commit comments