From 7a99ef376498a0ad8fb1f8379d8cef0002c48dde Mon Sep 17 00:00:00 2001 From: Rafael Palomar Date: Tue, 31 Oct 2023 07:03:43 +0100 Subject: [PATCH] Update CMakeLists.txt Co-authored-by: Jean-Christophe Fillion-Robin --- CMakeLists.txt | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index 20fd35e6b9..a11c75e455 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -365,9 +365,13 @@ mark_as_superbuild(ADDITIONAL_CXX_FLAGS) # enabling the gold linker in 3D Slicer, as outlined in PR: # https://github.com/Slicer/Slicer/pull/7294. # +set(CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS}" CACHE STRING "Flags used by the linker" FORCE) +set(CMAKE_MODULE_LINKER_FLAGS "${CMAKE_MODULE_LINKER_FLAGS}" CACHE STRING "Flags used by the linker (module)" FORCE) +set(CMAKE_SHARED_LINKER_FLAGS "${CMAKE_SHARED_LINKER_FLAGS}" CACHE STRING "Flags used by the linker (shared)" FORCE) + mark_as_superbuild(VARS CMAKE_EXE_LINKER_FLAGS:STRING - CMAKE_MODULE_LINKER_FLAGS:PATH + CMAKE_MODULE_LINKER_FLAGS:STRING CMAKE_SHARED_LINKER_FLAGS:STRING ALL_PROJECTS )