-
-
Notifications
You must be signed in to change notification settings - Fork 690
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
UseITK uses include_directories and link_directories #1450
Comments
Any movement on this one? |
Not really. ITK's build system pre-dates CMake 3 and its enablement of modern practices. Updating it is a huge undertaking, with lousy cost/benefit ratio. It will probably have to wait for the next big maintenance grant. |
This can currently be done by inspecting the ITK modules variables. Here is what I did in SimpleITK: https://github.com/SimpleITK/SimpleITK/blob/master/CMake/sitkTargetUseITK.cmake Perhaps it should be made more widely available. |
Do you use this for IO? I gave it a go lifting some relevant functionality from the |
Yes, it for every thing. From this commit in SimpleITK, the factory registration can be explicitly done when using the "ITKImageIO" and "ITKTransfromIO" modules. |
@KrisThielemans info RE including ITK. SimpleITK's method looks good but potentially a lot of work to switch over. |
thanks @rijobro. I have only very briefly glanced at this, and have no good idea what it would involve for us. Possibly that discussion should be held at UCL/STIR#432 to avoid cluttering this, unless it's of general benefit of course? |
This issue has been automatically marked as stale because it has not had recent activity. Thank you for your contributions. |
This issue has been automatically marked as stale because it has not had recent activity. Thank you for your contributions. |
Description
UseITK.cmake
usesinclude_directories
andlink_directories
.Steps to Reproduce
N/A
Expected behavior
Variables should be returned such that
target_include_directories
andtarget_link_libraries
can be used.Actual behavior
ITK/CMake/UseITK.cmake
Lines 26 to 30 in c95b998
ITK/CMake/UseITK.cmake
Line 232 in c95b998
include_directores
pollutes the include path. Our code (https://github.com/CCPPETMR/SIRF) builds against both ITK and NiftyReg, both of which have a copy ofnifti1.h
. For a particular library, we want to be using the NiftyReg files, but because of this issue, ITK includes get prepended. We therefore get into problems with theitk_nifti_mangle.h
.You can see this problem, which is present in one of our Travis builds: https://travis-ci.org/CCPPETMR/SIRF/builds/618272131?utm_source=github_status&utm_medium=notification. There is one matrix in red, due to this problem.
Reproducibility
N/A
Versions
From at least
4.13
. Still present inmaster
.Environment
Linux Ubuntu 14.04 (and potentially other distributions).
Additional Information
N/A
The text was updated successfully, but these errors were encountered: