Skip to content

Commit

Permalink
ENH: Enable propagation of linker flags
Browse files Browse the repository at this point in the history
This change allows customizing the linker flags at the superbuild level.
The motivation behind this modification was to enable the use of the
gold linker in 3D Slicer, as referenced in
Slicer/Slicer#7294, to expedite the linking
phase during the build process.

Co-authored-by: Jean-Christophe Fillion-Robin <[email protected]>
  • Loading branch information
RafaelPalomar and jcfr committed Oct 27, 2023
1 parent 4888deb commit fc5fa79
Showing 1 changed file with 15 additions and 0 deletions.
15 changes: 15 additions & 0 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -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
#
Expand Down

0 comments on commit fc5fa79

Please sign in to comment.