mirror of
https://github.com/taglib/taglib.git
synced 2025-06-03 09:08:09 -04:00
Merge pull request #414 from TsudaKageyu/fix-floattest
Fixed some mistakes in the CMake module for float types.
This commit is contained in:
commit
0f605be198
@ -1,5 +1,7 @@
|
||||
int main()
|
||||
int main(int argc, char **argv)
|
||||
{
|
||||
int ret = 0;
|
||||
|
||||
double bin1[] = {
|
||||
// "*TAGLIB*" encoded as a little-endian floating-point number
|
||||
(double)3.9865557444897601e-105, (double)0.0
|
||||
@ -8,6 +10,8 @@ int main()
|
||||
// "*TL*" encoded as a little-endian floating-point number
|
||||
(float)1.81480400e-013, (float)0.0
|
||||
};
|
||||
ret += ((int*)bin1)[argc];
|
||||
ret += ((int*)bin2)[argc];
|
||||
|
||||
return 0;
|
||||
return ret;
|
||||
}
|
||||
|
@ -2,12 +2,13 @@
|
||||
|
||||
MACRO(TEST_FLOAT_FORMAT FP_IEEE754)
|
||||
IF(NOT FP_IEEE754)
|
||||
TRY_COMPILE(HAVE_${FP_IEEE754} "${CMAKE_BINARY_DIR}" "${CMAKE_SOURCE_DIR}/cmake/TestFloatFormat.c"
|
||||
TRY_COMPILE(HAVE_FLOAT_FORMAT_BIN
|
||||
"${CMAKE_BINARY_DIR}" "${CMAKE_SOURCE_DIR}/cmake/TestFloatFormat.c"
|
||||
COPY_FILE "${CMAKE_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/TestFloatFormat.bin")
|
||||
|
||||
SET(FP_IEEE754 0)
|
||||
|
||||
IF(HAVE_${FP_IEEE754})
|
||||
IF(HAVE_FLOAT_FORMAT_BIN)
|
||||
|
||||
# dont match first/last letter because of string rounding errors :-)
|
||||
FILE(STRINGS "${CMAKE_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/TestFloatFormat.bin"
|
||||
|
Loading…
x
Reference in New Issue
Block a user