-
Notifications
You must be signed in to change notification settings - Fork 1.4k
[core] Use shared library dir as anchor in GetIncludeDir()
#20924
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: master
Are you sure you want to change the base?
Conversation
d937f4b to
065f051
Compare
|
Also, here are my next plans in this
|
However, we should warn if |
065f051 to
cb2b4a9
Compare
What kind of movement is done? For Wheels is |
Using the shared library directory as the anchor to resolve the resource directories like `GetIncludeDir()` is more direct and robust than using `GetRootSys()`, which loses its meaning in some installations (e.g. what should it be when ROOT is installed by the package manager? Just `/`?). Most importantly, this change lifts some more constraint from how the install tree can be reorganized after the fact. One can for example move the include and library directory around as wanted, as long as their relative paths don't change. This fixes the Python wheels, which were broken by commit a5b1ed9. As of commit a5b1ed9, ROOT became smarter about finding the include path in the install tree, inferring the correct relative path from $ROOTSYS and the CMAKE_INSTALL_INCLUDEDIR variable at build time. Before, that only happened for gnuinstall=ON, but now it always happens. However, for the Python wheel, we are breaking the assumptions that ROOT makes by moving around directories in the install tree. This commit fixes that situation.
cb2b4a9 to
6b8877e
Compare
Test Results 22 files 22 suites 3d 13h 2m 16s ⏱️ Results for commit 6b8877e. ♻️ This comment has been updated with latest results. |
Using the shared library directory as the anchor to resolve the resource directories like
GetIncludeDir()is more direct and robust than usingGetRootSys(), which loses its meaning in some installations (e.g. what should it be when ROOT is installed by the package manager? Just/?).Most importantly, this change lifts some more constraint from how the install tree can be reorganized after the fact. One can for example move the include and library directory around as wanted, as long as their relative paths don't change. This fixes the Python wheels, which were broken by commit a5b1ed9.
As of commit a5b1ed9, ROOT became smarter about finding the include path in the install tree, inferring the correct relative path from $ROOTSYS and the CMAKE_INSTALL_INCLUDEDIR variable at build time. Before, that only happened for gnuinstall=ON, but now it always happens.
However, for the Python wheel, we are breaking the assumptions that ROOT makes by moving around directories in the install tree. This commit fixes that situation.
I tested this with three build configurations:
CMAKE_INSTALL_INCLUDEDIRsetCMAKE_INSTALL_INCLUDEDIRrelative pathCMAKE_INSTALL_INCLUDEDIRabsolute pathIn all cases,
gROOT->GetIncludeDir()returns the correct path, both via therootexecutable in the build and install tree.