You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
[CMake] Make non-system include paths accessible at runtime
The current implementation faces issues with accessing header files
from external libraries stored in non-system paths when the C++
interpreter tries to resolve them at runtime. This access is necessary
under certain conditions even if a corresponding module file exists.
To address this issue, we need to ensure that non-system path includes,
which are known at build time, remain accessible at runtime. The
proposed solution leverages the existing `ROOT_INCLUDE_PATH` environment
variable.
This commit introduces a new CMake variable `DEFAULT_ROOT_INCLUDE_PATH`
and a helper function `BUILD_ROOT_INCLUDE_PATH`. This function allows
us to append include paths of external libraries to `BUILD_ROOT_INCLUDE_PATH`,
for example:
`DEFAULT_ROOT_INCLUDE_PATH("${Vc_INCLUDE_DIR}" DEFAULT_ROOT_INCLUDE_PATH)`
The `DEFAULT_ROOT_INCLUDE_PATH` variable is then utilized to populate the
`ROOT_INCLUDE_PATH` environment variable in the configuration files
(`thisroot.{sh,csh,fish,bat}`).
If the library's include path is dynamically modified between build and
run time, the configuration can be updated by patching the
`thisroot.{sh,csh,fish,bat}` files.
0 commit comments