-
-
Notifications
You must be signed in to change notification settings - Fork 668
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
CMake attempts to set properties on hdf5-static instead of hdf5-shared when BUILD_STATIC_LIBS is set to OFF #4882
Comments
Thank you for contributing an issue! 🙏 Welcome to the ITK community! 🤗👋☀️ We are glad you are here and appreciate your contribution. Please keep in mind our community participation guidelines. 📜 This is an automatic message. Allow for time for the ITK community to be able to read the issue and comment on it. |
|
I cannot see anything wrong with my PR 😄 . I have no idea what the interaction is between |
Thanks for double-checking @KrisThielemans 👍 I have to admit I don't understand the problem well enough 🤷 |
Hello, To give more context: I just wanted to recompile a fresh ITK build after I stopped using it for a few years, when I pressed configure for the first time, I got this: Because I wanted a dynamic build and The helper message was just "Build Static Libraries" I thought setting it to OFF would be enough for a dynamic build. The idea of ITK/Modules/ThirdParty/HDF5/src/itkhdf5/CMakeLists.txt Lines 509 to 531 in 15af3ae
There is a test to take care of both variable being set to OFF (my case), it will set a new variable The most conservative way to fix the problem is to add a test on
here:
here:
and here:
|
PS: I can do a PR with the conservative fix if you consider it relevant. |
A PR with the conservative fix sounds good! |
Ahh, but that would be a difference relative to upstream. |
You would need to mark deviations with # ITK --start
...
# ITK --stop Think whether the additional maintenance is justified by convenience that change would bring, and how often that convenience would be exercised. |
Maybe better would be a PR against upstream HDF5' relevant branches, and than updating ITK's bundled version of HDF5? But that is a lot more work. |
Sounds like a lot of work indeed.
TBH I don't feel qualified to decide about that. If I'm the only one stepping on this, it might be easier to let things as they are. |
I'd had to set |
Description
CMake attempts to properties on
hdf5-static
instead ofhdf5-shared
whenBUILD_STATIC_LIBS
is set toOFF
ITK/Modules/ThirdParty/HDF5/CMakeLists.txt
Line 84 in 15af3ae
The test to decide if it is shared or static is performed on
BUILD_SHARED_LIBS
, perhaps it should be done onBUILD_STATIC_LIBS
?If one manually set
BUILD_SHARED_LIBS
toON
in the CMake cache, it fixes the issue.Steps to Reproduce
BUILD_STATIC_LIBS
set toOFF
Versions
v5.4.0
Environment
CMake 3.29.6
The text was updated successfully, but these errors were encountered: