ROOT Version: 6.24/06
Compiler: g++ 8.5.0
Short and simple question, hopefully.
I’m using rootcling within a Makefile to build a dictionary for some classes.
I’d like to pass some header directories with
-isystem, but such include paths aren’t picked up when passed to rootcling. Google suggests the
withsystem option controls this, but I can’t find any way to pass it to rootcling. What’s the proper method to do this?
-Ipath works, but for reasons in the rest of the Makefile i’d like these paths to use
I can make a copy that substitues
-Ipath, but that seemed like a workaround for something that should be possible…
@vvassilev Is there another option (available now or planned for later)?
rootcling --help tells me:
--compilerI=<string> - Specify a compiler default include path, to suppress unneeded -isystem
Would that suffice?
@vvassilev (and other Cling developers) see “most critical flags in practice” and “many other flags are interesting” in: clangd → Design → Compile commands
Then see: Clang command line argument reference
@vvassilev I don’t seem to have that option listed by
rootcling --help, but I’m not sure this sounds suitable for what I need. I assume
<string> is a path, in which case forming the necessary string of
--compilerI=/path/1 --compilerI=/path/2 --compilerI=/path/3 flags to give to rootcling seems essentially the same as just forming
-I/path/1 -I/path/2 -I/path/3 and using that. Each of these paths is an independent directory for a set of 3rd party components, so can’t be represented by a single “default include path”.
@Wile_E_Coyote i’m not sure what the relevance of the first link is. I’m not using clangd. The second suggests using
-isystem<directory> should be supported, but rootcling doesn’t seem to allow it.
From this post, my understanding was that
cling could potentially recognise
-isystem paths (internally converting them to
-I paths), if the
withSystem flag was set. What I was looking for was a method to get
rootcling to call
withSystem=true. Perhaps that’s not possible (or perhaps my question was unclear).
In any event, it’s easy enough to make a copy line with
-isystem swapped for
-I, so it’s probably not worth spending too much effort on.
Thanks for all the replies though.
isystem should be supported: https://github.com/root-project/root/blob/f230da8c5abdd4af8971aa5a64719c40fb6cbd12/core/dictgen/src/rootcling_impl.cxx#L4156
I suspect you will need to do something like
-isystem<space> path as clang does not like the
@vvassilev It should really be possible to use “
-isystem/my/absolute/path” and “
-isystemmy/relative/path” (note also the “
Indeed, that might work as we are forwarding the arguments to clang anyway.
Perhaps it should be, but unless I’m mistaken (which is possible) it seems it isn’t.
dict.tgz (749 Bytes)
This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.