File tree Expand file tree Collapse file tree 1 file changed +10
-10
lines changed Expand file tree Collapse file tree 1 file changed +10
-10
lines changed Original file line number Diff line number Diff line change @@ -57,16 +57,6 @@ endif()
57
57
# Add compile flags
58
58
target_compile_options ("${PROJECT_NAME} " PUBLIC ${C_ASM_COMPILE_FLAGS} )
59
59
60
-
61
- # Determine if long double and double is the same on current platform
62
- if (${OPENLIBM_ARCH_FOLDER} STREQUAL "i387" OR ${OPENLIBM_ARCH_FOLDER} STREQUAL "amd64" )
63
- set (LONG_DOUBLE_NOT_DOUBLE 1 )
64
- elseif (${OPENLIBM_ARCH_FOLDER} STREQUAL "aarch64" )
65
- if (NOT (${CMAKE_SYSTEM_NAME} STREQUAL "Darwin" OR ${CMAKE_SYSTEM_NAME} STREQUAL "Windows" ))
66
- set (LONG_DOUBLE_NOT_DOUBLE 1 )
67
- endif ()
68
- endif ()
69
-
70
60
# Project Source
71
61
set (PROJECT_SRC "${PROJECT_SOURCE_DIR} " )
72
62
@@ -259,6 +249,16 @@ if(NOT ${CMAKE_SYSTEM_NAME} STREQUAL "Windows")
259
249
)
260
250
endif ()
261
251
252
+ # Determine if long double and double are the same size
253
+ include (CheckCSourceCompiles )
254
+ check_c_source_compiles ("
255
+ #include <float.h>
256
+ #if (LDBL_MANT_DIG == DBL_MANT_DIG)
257
+ #error \" long double and double are the same size\"
258
+ #endif
259
+ int main(void ) { return 0; }
260
+ " LONG_DOUBLE_NOT_DOUBLE )
261
+
262
262
# Add in long double functions for x86, x64 and aarch64
263
263
if (LONG_DOUBLE_NOT_DOUBLE )
264
264
list (APPEND OPENLIBM_C_SOURCE
You can’t perform that action at this time.
0 commit comments