Skip to content

Commit

Permalink
try_error: save target setting
Browse files Browse the repository at this point in the history
  • Loading branch information
mgondan authored and JanWielemaker committed Dec 21, 2023
1 parent 2564456 commit 1cb3a63
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions cmake/CheckFloatingPointFormat.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -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}"
Expand Down

0 comments on commit 1cb3a63

Please sign in to comment.