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:
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.