Skip to content

Commit

Permalink
With GNU linker use as-needed for linking
Browse files Browse the repository at this point in the history
  • Loading branch information
Marko Petric committed Mar 12, 2021
1 parent 632a274 commit 166f230
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion cmake/DD4hepBuild.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -99,7 +99,7 @@ macro(dd4hep_set_compiler_flags)
if("${LINKER_TYPE}" STREQUAL "APPLE")
SET ( CMAKE_SHARED_LINKER_FLAGS "${CMAKE_SHARED_LINKER_FLAGS} -Wl,-undefined,error")
elseif("${LINKER_TYPE}" STREQUAL "GNU")
SET ( CMAKE_SHARED_LINKER_FLAGS "${CMAKE_SHARED_LINKER_FLAGS} -Wl,--no-undefined")
SET ( CMAKE_SHARED_LINKER_FLAGS "${CMAKE_SHARED_LINKER_FLAGS} -Wl,--no-undefined,--as-needed")
else()
MESSAGE( WARNING "No known linker (GNU or Apple) has been detected, pass no flags to linker" )
endif()
Expand Down

0 comments on commit 166f230

Please sign in to comment.