Skip to content

Commit

Permalink
Remove the CMake/Scons compile-time check for IEEE 754 compliance
Browse files Browse the repository at this point in the history
Now handled by a static assertion.
  • Loading branch information
Vultraz committed May 21, 2018
1 parent 6eddc6f commit d931519
Show file tree
Hide file tree
Showing 4 changed files with 1 addition and 44 deletions.
13 changes: 0 additions & 13 deletions CMakeLists.txt
Expand Up @@ -63,19 +63,6 @@ if(NOT CXX_STD)
set(CXX_STD "14")
endif()

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=${CXX_STD}" 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})
elseif(NOT IEEE754_TEST_RETURN_CODE EQUAL 0)
message(FATAL_ERROR "Your platform does not represent floating point numbers in the IEEE 754 format.")
endif()
else()
message(WARNING "You are cross-compiling. Skipping IEEE 754 test.")
endif()

if(ENABLE_GAME OR ENABLE_TESTS)
find_package(OpenGL REQUIRED)
find_package(GLEW REQUIRED)
Expand Down
10 changes: 1 addition & 9 deletions SConstruct
Expand Up @@ -308,7 +308,7 @@ def Warning(message):

from metasconf import init_metasconf
configure_args = dict(
custom_tests = init_metasconf(env, ["ieee_754", "cplusplus", "python_devel", "sdl", "boost", "cairo", "pango", "pkgconfig", "gettext_tool", "lua", "gl"]),
custom_tests = init_metasconf(env, ["cplusplus", "python_devel", "sdl", "boost", "cairo", "pango", "pkgconfig", "gettext_tool", "lua", "gl"]),
config_h = "$build_dir/config.h",
log_file="$build_dir/config.log", conf_dir="$build_dir/sconf_temp")

Expand Down Expand Up @@ -338,13 +338,6 @@ if env["prereqs"]:
conf.CheckLib("m")
conf.CheckFunc("round")

def CheckIEEE754(conf):
if not env["host"]:
return conf.CheckIEEE754()
else:
Warning("You are cross-compiling. Skipping IEEE 754 test.")
return True

def CheckAsio(conf):
if env["PLATFORM"] == 'win32':
conf.env.Append(LIBS = ["libws2_32"])
Expand All @@ -362,7 +355,6 @@ if env["prereqs"]:
conf.CheckSDL("SDL2_image", header_file = "SDL_image")

have_server_prereqs = (\
CheckIEEE754(conf) & \
conf.CheckCPlusPlus(gcc_version = "4.8") & \
conf.CheckLib("libcrypto") & \
conf.CheckBoost("iostreams", require_version = boost_version) & \
Expand Down
11 changes: 0 additions & 11 deletions scons/ieee_754.py

This file was deleted.

11 changes: 0 additions & 11 deletions src/compile_time_tests/ieee_754.cpp

This file was deleted.

0 comments on commit d931519

Please sign in to comment.