diff --git a/CMakeLists.txt b/CMakeLists.txt index a2777f6a52..20fd35e6b9 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -357,6 +357,21 @@ set(ADDITIONAL_CXX_FLAGS "" CACHE STRING "Additional CXX Flags") mark_as_advanced(ADDITIONAL_CXX_FLAGS) mark_as_superbuild(ADDITIONAL_CXX_FLAGS) +#----------------------------------------------------------------------------- +# Linker flags +# +# This section is adapted to enhance the build process by introducing the +# possibility of customizing linker flags. This was added in connection with +# enabling the gold linker in 3D Slicer, as outlined in PR: +# https://github.com/Slicer/Slicer/pull/7294. +# +mark_as_superbuild(VARS + CMAKE_EXE_LINKER_FLAGS:STRING + CMAKE_MODULE_LINKER_FLAGS:PATH + CMAKE_SHARED_LINKER_FLAGS:STRING + ALL_PROJECTS +) + #----------------------------------------------------------------------------- # Set symbol visibility Flags #