Xcode 14 warns about -undefined dynamic_lookup; simply suppress:

"suppress" ignores any unresolved symbol. This requires flat_namespace,
see man ld.
This commit is contained in:
Axel Naumann 2022-11-11 14:30:30 +01:00 committed by jenkins
parent 086229fd34
commit c88ce22326

View File

@ -14,7 +14,7 @@ endif()
set_target_properties(clingDemoPlugin PROPERTIES LIBRARY_OUTPUT_DIRECTORY ".")
if(APPLE)
target_link_libraries(clingDemoPlugin PUBLIC -Wl,-bind_at_load -Wl,-undefined -Wl,dynamic_lookup)
target_link_libraries(clingDemoPlugin PUBLIC -Wl,-bind_at_load -Wl,-flat_namespace -Wl,-undefined -Wl,suppress)
elseif(NOT MSVC)
target_link_libraries(clingDemoPlugin PUBLIC -Wl,--unresolved-symbols=ignore-in-object-files)
endif()