Merge pull request #639 from TsudaKageyu/remove-cmake-check-float

Run-time check for byte order rather than CMake check.
This commit is contained in:
Tsuda Kageyu
2015-08-07 01:17:27 +09:00
7 changed files with 23 additions and 158 deletions

View File

@ -1,8 +1,6 @@
include(CheckLibraryExists)
include(CheckTypeSize)
include(CheckCXXSourceCompiles)
include(TestBigEndian)
include(TestFloatFormat)
# Check if the size of numeric types are suitable.
@ -36,27 +34,6 @@ if(NOT ${SIZEOF_DOUBLE} EQUAL 8)
message(FATAL_ERROR "TagLib requires that double is 64-bit wide.")
endif()
# Determine the CPU byte order.
test_big_endian(IS_BIG_ENDIAN)
if(NOT IS_BIG_ENDIAN)
set(SYSTEM_BYTEORDER 1)
else()
set(SYSTEM_BYTEORDER 2)
endif()
# Check if the format of floating point types are suitable.
test_float_format(FP_IEEE754)
if(${FP_IEEE754} EQUAL 1)
set(FLOAT_BYTEORDER 1)
elseif(${FP_IEEE754} EQUAL 2)
set(FLOAT_BYTEORDER 2)
else()
message(FATAL_ERROR "TagLib requires that floating point types are IEEE754 compliant.")
endif()
# Determine which kind of atomic operations your compiler supports.
check_cxx_source_compiles("