From ebb7b7c796061c75cc93db0ba1d117197e7abf03 Mon Sep 17 00:00:00 2001 From: JStrader-Mirion Date: Mon, 21 Apr 2025 02:47:31 -0400 Subject: [PATCH] Force dynamic linking --- CMakeLists.txt | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/CMakeLists.txt b/CMakeLists.txt index 349f3cd..59a8fdb 100755 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -422,3 +422,10 @@ configure_file( ) +# Ensure we link libm dynamically +target_link_options(SpecUtils PRIVATE "-Wl,-Bdynamic" "-lm") +# Remove accidental globalĀ -static +string(REPLACE "-static" "" CMAKE_SHARED_LINKER_FLAGS "${CMAKE_SHARED_LINKER_FLAGS}") +if (CMAKE_CXX_COMPILER_ID STREQUAL "GNU") + add_compile_options(-Wno-unknown-warning-option) +endif() \ No newline at end of file