Conversation
currently GBL exports: /home/fschlepp/alice/sw/ubuntu2404_x86-64/GBL/V03-01-04-4/lib/libGBL.so;-L/local/workspace/DailyBuilds/DailyO2-ubuntu2404/daily-tags.BsAuSDt8F5/ubuntu2404_x86-64/ROOT/v6-36-04-alice9-10/lib;-lCore;-lImt;-lRIO;-lNet;-lHist;-lGraf;-lGraf3d;-lGpad;-lROOTVecOps;-lTree;-lTreePlayer;-lRint;-lPostscript;-lMatrix;-lPhysics;-lMathCore;-lThread;-lROOTNTuple;-lMultiProc;-lROOTDataFrame;-lROOTNTupleUtil;Eigen3::Eigen which leads to link failures
|
REQUEST FOR PRODUCTION RELEASES: This will add The following labels are available |
dependencies/O2Dependencies.cmake
Outdated
| # also GBL_LIBRARIES contains raw linker flags to ROOT we need to filter out | ||
| set(GBL_LIBRARIES_FILTERED "") | ||
| foreach(_lib IN LISTS GBL_LIBRARIES) | ||
| if(NOT _lib MATCHES "^-[lL]") |
There was a problem hiding this comment.
| if(NOT _lib MATCHES "^-[lL]") | |
| if(TARGET "${_lib}" OR IS_ABSOLUTE "${_lib}" OR NOT _lib MATCHES "^-") |
There was a problem hiding this comment.
there might be -Wl,... linker options, BTW...
There was a problem hiding this comment.
thanks for the suggestion, how about I split the linker options and flags like this:
set(GBL_LIBRARIES_FILTERED "")
set(GBL_LINK_OPTIONS "")
foreach(_lib IN LISTS GBL_LIBRARIES)
if(_lib MATCHES "^-[lL]")
continue()
elseif(_lib MATCHES "^-")
list(APPEND GBL_LINK_OPTIONS "${_lib}")
else()
list(APPEND GBL_LIBRARIES_FILTERED "${_lib}")
endif()
endforeach()
add_library(GBL::GBL INTERFACE IMPORTED)
target_include_directories(GBL::GBL INTERFACE ${GBL_INCLUDE_DIR})
target_link_libraries(GBL::GBL INTERFACE
${GBL_LIBRARIES_FILTERED}
Eigen3::Eigen
)
target_link_options(GBL::GBL INTERFACE ${GBL_LINK_OPTIONS})
currently GBL exports: /home/fschlepp/alice/sw/ubuntu2404_x86-64/GBL/V03-01-04-4/lib/libGBL.so;-L/local/workspace/DailyBuilds/DailyO2-ubuntu2404/daily-tags.BsAuSDt8F5/ubuntu2404_x86-64/ROOT/v6-36-04-alice9-10/lib;-lCore;-lImt;-lRIO;-lNet;-lHist;-lGraf;-lGraf3d;-lGpad;-lROOTVecOps;-lTree;-lTreePlayer;-lRint;-lPostscript;-lMatrix;-lPhysics;-lMathCore;-lThread;-lROOTNTuple;-lMultiProc;-lROOTDataFrame;-lROOTNTupleUtil;Eigen3::Eigen
which leads to link failures
This removes all the
-lflags from the library.