diff --git a/cmake/CheckFloatingPointFormat.cmake b/cmake/CheckFloatingPointFormat.cmake index a1a6581020..491d1023f2 100644 --- a/cmake/CheckFloatingPointFormat.cmake +++ b/cmake/CheckFloatingPointFormat.cmake @@ -6,10 +6,12 @@ MACRO(UB_CHECK_FLOATING_POINT_FORMAT IEEE754_FLOATS FLOAT_BYTES_BIGENDIAN FLOAT_ SET(UB_CHECK_FLOATING_POINT_FORMAT_TARGET "${CMAKE_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/CheckFloatingPointFormat.bin") + SET(CMAKE_TRY_COMPILE_TARGET_TYPE_SAVE ${CMAKE_TRY_COMPILE_TARGET_TYPE}) SET(CMAKE_TRY_COMPILE_TARGET_TYPE STATIC_LIBRARY) # added to silence Windows Defender TRY_COMPILE(HAVE_${IEEE754_FLOATS} "${CMAKE_BINARY_DIR}" "${UB_DIRECTORY_OF_CHECK_FLOATING_POINT_FORMAT_SCRIPT}/CheckFloatingPointFormat.c" COPY_FILE "${UB_CHECK_FLOATING_POINT_FORMAT_TARGET}") + SET(CMAKE_TRY_COMPILE_TARGET_TYPE ${CMAKE_TRY_COMPILE_TARGET_TYPE_SAVE}) IF(HAVE_${IEEE754_FLOATS}) FILE(STRINGS "${UB_CHECK_FLOATING_POINT_FORMAT_TARGET}"