Skip to content

Commit ebb7b7c

Browse files
Force dynamic linking
1 parent 377af0f commit ebb7b7c

File tree

1 file changed

+7
-0
lines changed

1 file changed

+7
-0
lines changed

CMakeLists.txt

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -422,3 +422,10 @@ configure_file(
422422
)
423423

424424

425+
# Ensure we link libm dynamically
426+
target_link_options(SpecUtils PRIVATE "-Wl,-Bdynamic" "-lm")
427+
# Remove accidental global -static
428+
string(REPLACE "-static" "" CMAKE_SHARED_LINKER_FLAGS "${CMAKE_SHARED_LINKER_FLAGS}")
429+
if (CMAKE_CXX_COMPILER_ID STREQUAL "GNU")
430+
add_compile_options(-Wno-unknown-warning-option)
431+
endif()

0 commit comments

Comments
 (0)