Skip to content

Commit f610080

Browse files
committed
[core] Specify linker options as PRIVATE
They should not be propagated to targets that link against libCling (which also nobody should do).
1 parent e63a621 commit f610080

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

core/metacling/src/CMakeLists.txt

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -222,18 +222,18 @@ if(MSVC)
222222
endif()
223223

224224
if(APPLE)
225-
target_link_libraries(Cling PUBLIC -Wl,-w -Wl,-bind_at_load)
225+
target_link_libraries(Cling PRIVATE -Wl,-w -Wl,-bind_at_load)
226226
elseif(NOT MSVC)
227227
# Require the linker to resolve the symbol internally and prevent
228228
# conflicts when linked with another software using also LLVM like in
229229
# the problem reported for Julia in
230230
# https://github.com/JuliaHEP/ROOT.jl/issues/17#issuecomment-882719292
231231
# and by ALICE in https://github.com/root-project/root/issues/19889
232232
# Only needed for Linux: Mac uses linker namespaces and Windows explicit export/import
233-
target_link_libraries(Cling PUBLIC -Wl,-Bsymbolic)
233+
target_link_libraries(Cling PRIVATE -Wl,-Bsymbolic)
234234
endif()
235235

236236
if (CMAKE_SYSTEM_NAME MATCHES FreeBSD)
237-
target_link_libraries(Cling PUBLIC util procstat)
237+
target_link_libraries(Cling PRIVATE util procstat)
238238
endif()
239239

0 commit comments

Comments
 (0)