-
Notifications
You must be signed in to change notification settings - Fork 206
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
targetLinkLibrariesWithDynamicLookup: Backport module from scikit-build #80
targetLinkLibrariesWithDynamicLookup: Backport module from scikit-build #80
Conversation
@jcfr https://github.com/SimpleITK/SimpleITK/blob/master/CMake/sitkLanguageOptions.cmake#L23-L27 I don't see a replacement for this variable. Any suggestions on how to update the behavior? |
@jcfr Any feedback or suggestions on this issue? |
When using manylinux, the following is done: This allows to keep |
What is missing from the solution of marking a find language library as QUIET, and then not linking against it? The prior solution does not include a check to ensure linking does not occur, but it does not require custom configuration when a system or language is encountered without the libraries. The problem ( or purposeful intent ) of language development packages not including libraries has occurred several time in the real world ( outside of building on manylinux). It is necessary to continue supporting these systems output the box. An improved solution to the existing one is welcomed, if it meets the requirements. |
Looking at your previous link, I missed the part where it doesn't link against it. It looks like this is done in function It turns out that the implementation of that same function in scikit-build also conditionally links against the python library. We are good on that front. The problem is in two locations:
and Problem (1)For the problem (1), changing that code from
to
should address the issue. Similarly to the other CMake modules, I will make sure it is documented on read the docs. In the mean time, associated documentation is here: https://github.com/scikit-build/scikit-build/blob/d592c8084a7e0502d9da9e7aacf0e465be40cc67/skbuild/resources/cmake/targetLinkLibrariesWithDynamicLookup.cmake#L61-L92 Problem (2)For the problem (2) in
should be changed into
Todo:
|
Thanks! And it's more that just Python. All language library linking goes through sitk_target_link_libraries_with_dynamic_lookup. |
* update long signature: "LinkFlagsVar" is now optional * add support for short signature: check_dynamic_lookup(<ResultVar>) See SimpleITK/SimpleITK#80
scikit-build/scikit-build#230 is adding documentation along with support for the short signature |
* update long signature: "LinkFlagsVar" is now optional * add support for short signature: check_dynamic_lookup(<ResultVar>) See SimpleITK/SimpleITK#80
Replacing The Original SimpleITK TargetLinkLibrariesWithDynamicLookup with the now upstream scikit-build CMake module. The goal is to have this module mature in the scikit-build repository before CMake adopting it. Change-Id: I9e3eba4f3de436b297a2547c4f2a1346e6ecfec3
4b22c9b
to
9086c4b
Compare
The scikit-build upstream CMake module no longer defined extra CMake variables. The variable need to be explicitly passed to get initialized.
Use standard regex MATCH approach to avoid a string being confused with a variable. This patch addressed the following CMake warning: CMake Warning (dev) at CMake/sitkTargetLinkLibrariesWithDynamicLookup.cmake:466 (if): Policy CMP0054 is not set: Only interpret if() arguments as variables or keywords when unquoted. Run "cmake --help-policy CMP0054" for policy details. Use the cmake_policy command to set the policy and suppress this warning. Quoted variables like "unused" will no longer be dereferenced when the policy is set to NEW. Since the policy is not set the OLD behavior will be used.
0917ff5
to
0027799
Compare
CircleCI continuous build's configuration looks OK. Merging into SimpleITK for nightly testing across platforms. |
Note that the name of the function remains prefixed with "sitk_"
Change-Id: I9e3eba4f3de436b297a2547c4f2a1346e6ecfec3