This commit is contained in:
Daniel Lemire 2026-02-24 16:24:18 -05:00
parent c99403b8af
commit e22894002d
2 changed files with 2 additions and 2 deletions

View File

@ -1,7 +1,7 @@
add_library(fast_float_strtod STATIC fast_float_strtod.cpp)
target_link_libraries(fast_float_strtod PRIVATE fast_float)
if(CMAKE_CXX_COMPILER_ID MATCHES "Clang|GNU" AND NOT WIN32)
if((CMAKE_CXX_COMPILER_ID STREQUAL "Clang" AND NOT WIN32) OR (CMAKE_CXX_COMPILER_ID STREQUAL "GNU" AND CMAKE_CXX_COMPILER_VERSION VERSION_GREATER_EQUAL "13" AND NOT WIN32))
target_link_options(fast_float_strtod PRIVATE -nostdlib++)
endif()

View File

@ -110,7 +110,7 @@ add_subdirectory(build_tests)
add_subdirectory(bloat_analysis)
add_executable(strtod_test strtod_test.c)
if(CMAKE_CXX_COMPILER_ID MATCHES "Clang|GNU" AND NOT WIN32)
if((CMAKE_CXX_COMPILER_ID STREQUAL "Clang" AND NOT WIN32) OR (CMAKE_CXX_COMPILER_ID STREQUAL "GNU" AND CMAKE_CXX_COMPILER_VERSION VERSION_GREATER_EQUAL "13" AND NOT WIN32))
target_link_options(strtod_test PUBLIC -nostdlib++)
endif()
target_link_libraries(strtod_test PUBLIC fast_float_strtod)