root_generate_dictionary macro allows to set the include folders for rootcling using the
OPTIONS parameter. However, the include folders passed in this way are ignored by the macro when searching for the given headers, forcing the user to define them folder-wise with a
For example, consider this simple reproducer (563 Bytes): when configuring it with cmake I get this error:
CMake Error at /home/mori/software/install/ROOT_6.20.00/cmake/RootMacros.cmake:333 (message): Cannot find header MyClass.h to generate dictionary MyClassDict for. Did you forget to set the INCLUDE_DIRECTORIES property for the current directory? Call Stack (most recent call first): CMakeLists.txt:10 (root_generate_dictionary)
while uncommenting the
include_directories comamnd in CMakeLists.txt it works.
So is this the intended behavior? As reported by @Axel in this thread I understood that passing include folders with
OPTIONS -I should be correct procedure, without needing to set the
include_directories (which will affect also other targets in the folder in a potentially undesired way). But the cmake error message is quite explicit about the need to set it, so I’m a bit confused.
Thanks in advance for any clarification.
ROOT Version: 6.20.00
Platform: Not Provided
Compiler: Not Provided