Details
-
Bug
-
Resolution: Fixed
-
Medium
-
6.08/06
-
None
-
Debian 8 x86_64
Description
Hi!
I ran into some problems caused by hard-coded paths in #include statements inside the ROOT dictionary.
If headers of a ROOT-based shared library are not located at the same location on the build and the execution system (e.g. clusters), apparently one has to provide all headers without preceding paths to rootcling and specify the locations(s) via -I flags. The paths provided by those flags will be stored in the dictionary and then checked on the execution system. They can be further adjusted by modifying the ROOT_INCLUDE_PATH environment variable to include additional header locations.
Now, the problem is that using ROOT_GENERATE_DICTIONARY it seems to be impossible to pass headers without preceding path to rootcling. In the older
FindROOT.cmake the path of the header dictionary will be automatically added (find_file). In the newer RootNewMacros.cmake the raw headers string will be passed to rootcling but a CMake dependency on the headers will be introduced:
341 #---call rootcint------------------------------------------
|
342 add_custom_command(OUTPUT ${dictionary}.cxx ${pcm_name} ${rootmap_name}
|
343 COMMAND ${command} -f ${dictionary}.cxx ${newargs} ${excludepathsargs} ${rootmapargs}
|
344 ${ARG_OPTIONS} ${definitions} ${includedirs} ${rheaderfiles} ${_linkdef}
|
345 IMPLICIT_DEPENDS CXX ${_linkdef} ${headerfiles}
|
346 DEPENDS ${headerfiles} ${_linkdef} ${ROOTCINTDEP}
|
As the headers were specified without paths, this will obviously bring CMake to a stop complaining about the missing headers.
I don't really know how to fix this in the best way. Please let me know if there is another way around this problem.
Cheers,
Dominik
Attachments
Issue Links
- relates to
-
ROOT-8706 Regression introduced by ROOT-8701
-
- Closed
-