Attempted fix for builds failing with compilers older than GCC 6

This commit is contained in:
Jyrki Vesterinen 2016-12-23 00:26:01 +02:00
parent 6c9ff7c4b3
commit 9ad78036b5
2 changed files with 5 additions and 5 deletions

View file

@ -57,7 +57,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
OUTPUT_VARIABLE IEEE754_TEST_OUTPUT)
CMAKE_FLAGS "-DCXX_STANDARD=11" OUTPUT_VARIABLE IEEE754_TEST_OUTPUT)
if(NOT IEEE754_TEST_RETURN_CODE EQUAL 0)
message(${IEEE754_TEST_OUTPUT})
message(FATAL_ERROR "Your platform does not represent floating point numbers in the IEEE 754 format.")

View file

@ -319,6 +319,10 @@ if env["multilib_arch"]:
# Some tests need to load parts of boost
env.PrependENVPath('LD_LIBRARY_PATH', env["boostlibdir"])
# Some tests require at least C++11
env.AppendUnique(CCFLAGS = Split("-W -Wall"), CFLAGS = ["-std=c99"])
env.AppendUnique(CXXFLAGS = "-std=c++" + env["cxx_std"])
if env["prereqs"]:
conf = env.Configure(**configure_args)
@ -463,10 +467,6 @@ for env in [test_env, client_env, env]:
env.Append(CPPDEFINES = ["HAVE_CONFIG_H"])
if "gcc" in env["TOOLS"]:
env.AppendUnique(CCFLAGS = Split("-W -Wall"), CFLAGS = ["-std=c99"])
env.AppendUnique(CXXFLAGS = "-std=c++" + env["cxx_std"])
if env['openmp']:
env.AppendUnique(CXXFLAGS = ["-fopenmp"], LIBS = ["gomp"])