Skip to content

Commit

Permalink
Change SCons and CMake to C++14
Browse files Browse the repository at this point in the history
(cherry-picked from commit 2a17ecc)
  • Loading branch information
GregoryLundberg authored and jyrkive committed Oct 7, 2018
1 parent 0da9c0a commit cc5fe2a
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
4 changes: 2 additions & 2 deletions CMakeLists.txt
Expand Up @@ -62,7 +62,7 @@ option(ENABLE_HISTORY "Enable using GNU history for history in lua console" ON)

if(NOT CMAKE_CROSSCOMPILING)
try_run(IEEE754_TEST_RETURN_CODE IEEE754_TEST_COMPILED ${CMAKE_BINARY_DIR} ${CMAKE_SOURCE_DIR}/src/compile_time_tests/ieee_754.cpp
CMAKE_FLAGS "-DCMAKE_CXX_STANDARD=11" COMPILE_OUTPUT_VARIABLE IEEE754_TEST_COMPILE_OUTPUT)
CMAKE_FLAGS "-DCMAKE_CXX_STANDARD=14" COMPILE_OUTPUT_VARIABLE IEEE754_TEST_COMPILE_OUTPUT)
if(NOT IEEE754_TEST_COMPILED)
message(WARNING "Failed to compile the IEEE 754 test. Skipping it.")
message(${IEEE754_TEST_COMPILE_OUTPUT})
Expand Down Expand Up @@ -199,7 +199,7 @@ if(NOT DEFINED CXX_FLAGS_USER)

endif(NOT DEFINED CXX_FLAGS_USER)

set(COMPILER_FLAGS "-std=c++11 -Wall -Wextra -Werror=non-virtual-dtor -Wno-unused-local-typedefs -Wno-maybe-uninitialized -Wold-style-cast")
set(COMPILER_FLAGS "-std=c++14 -Wall -Wextra -Werror=non-virtual-dtor -Wno-unused-local-typedefs -Wno-maybe-uninitialized -Wold-style-cast")

if(CMAKE_CXX_COMPILER_ID MATCHES "Clang")
set(COMPILER_FLAGS "${COMPILER_FLAGS} -Qunused-arguments -Wno-unknown-warning-option -Wmismatched-tags -Wno-conditional-uninitialized")
Expand Down
2 changes: 1 addition & 1 deletion SConstruct
Expand Up @@ -108,7 +108,7 @@ opts.AddVariables(
BoolVariable('ccache', "Use ccache", False),
('ctool', 'Set c compiler command if not using standard compiler.'),
('cxxtool', 'Set c++ compiler command if not using standard compiler.'),
EnumVariable('cxx_std', 'Target c++ std version', '11', ['11', '1y', '14']),
EnumVariable('cxx_std', 'Target c++ std version', '14', ['14']),
BoolVariable('openmp', 'Enable openmp use.', False),
('sanitize', 'Enable clang and GCC sanitizer functionality. A comma separated list of sanitize suboptions must be passed as value.', ''),
BoolVariable("fast", "Make scons faster at cost of less precise dependency tracking.", False),
Expand Down

0 comments on commit cc5fe2a

Please sign in to comment.