mirror of
https://github.com/taglib/taglib.git
synced 2025-07-17 20:44:20 -04:00
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:
@ -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("
|
||||
|
Reference in New Issue
Block a user