8000 Update extras to build with modern chaiscript/c++11 · ChaiScript/ChaiScript_Extras@47f5a33 · GitHub
[go: up one dir, main page]

Skip to content

Commit 47f5a33

Browse files
committed
Update extras to build with modern chaiscript/c++11
1 parent b062ee8 commit 47f5a33

File tree

3 files changed

+9489
-6475
lines changed

3 files changed

+9489
-6475
lines changed

CMakeLists.txt

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -80,13 +80,13 @@ enable_testing()
8080
if(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()
8888
else()
89-
set(CPP11_FLAG "-std=c++11")
89+
set(CPP14_FLAG "-std=c++14")
9090
endif()
9191

9292
if(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)
103103
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})
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()
126126
elseif(CMAKE_COMPILER_IS_GNUCC)
127-
set(LINKER_FLAGS "${LINKER_FLAGS} ${CPP11_FLAG}")
127+
set(LINKER_FLAGS "${LINKER_FLAGS} ${CPP14_FLAG}")
128128
endif()
129129

130130
# limitations in MinGW require us to make an optimized build

0 commit comments

Comments
 (0)
0