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()
5757# Add compile flags
5858target_compile_options ("${PROJECT_NAME} " PUBLIC ${C_ASM_COMPILE_FLAGS} )
5959
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-
7060# Project Source
7161set (PROJECT_SRC "${PROJECT_SOURCE_DIR} " )
7262
@@ -259,6 +249,16 @@ if(NOT ${CMAKE_SYSTEM_NAME} STREQUAL "Windows")
259249 )
260250endif ()
261251
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+
262262# Add in long double functions for x86, x64 and aarch64
263263if (LONG_DOUBLE_NOT_DOUBLE)
264264 list (APPEND OPENLIBM_C_SOURCE
You can’t perform that action at this time.
0 commit comments