-
-
Notifications
You must be signed in to change notification settings - Fork 664
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
conflict with exported CMake target for HDF5 with ITK_USE_SYSTEM_HDF5=OFF #3315
Comments
Probably root-cause of microsoft/vcpkg#15502 |
@hjmjohnson @seanm do you agree with "those targets should be renamed to @KrisThielemans PRs are welcome. |
I'm not qualified to say, I know very little about cmake. But I do observe that literally everything else in the |
Since HDF5 has a rich CMake support, I think we try to just compile it. I think we do that because we think it can be used as a normal HDF5 build. I guess Kris feels differently? Maybe Or maybe it is just needed to have |
When ITK is built with bundled third-party libraries, we try to mangle their symbols to avoid conflicts during linking. See |
We already do that for HDF5. I think the problem here are CMake target names. |
Yes, that's why I mentioned the |
@bradking , I cannot find where you wrote this. Would this need some After changing the tags, presumably we'd also need to change ITK/Modules/ThirdParty/HDF5/CMakeLists.txt Lines 80 to 84 in 9de2b57
|
In #3315 (comment):
Anyway, the |
We do occasionally manually edit HDF5's source code, 1be1b17 is a recent example. Changing CMake target names should not be hard. That would prevent people from using bundled HDF5 as a normal HDF5 build. But I guess there aren't many who do that, so it wouldn't be a big loss. Kris, do you mind making a PR? |
Description
When using
ITK_USE_SYSTEM_HDF5=OFF
, ITK exportshdf5_cpp-shared
andhdf5-shared
(or the non-shared) targets but this is incorrect for 2 reasons:find_package(HDF5)
afterfind_package(ITK)
In my opinion, those targets should be renamed to
itkhdf*
.Steps to Reproduce
The following
CMakeLists.txt
illustrates both problemsExpected behavior
This should just find an "external" HDF5
Actual behavior
After building/installing ITK
master
and HDF5 1.13.1, CMake outputsReproducibility
all the time.
Versions
Tested with ITK 5.2.1 and current
master
Environment
Tested on Windows 10 with VC 2019, CMake 3.22.3, but this will happen everywhere.
The text was updated successfully, but these errors were encountered: