`PYTHON_LIBRARY` may contain a list because of `SelectLibraryConfigurations`.
If it is the case, the list can be:
optimized;<FILEPATH_TO_RELEASE_LIBRARY>;debug;<FILEPATH_TO_DEBUG_LIBRARY>
Instead of directly using the value of `PYTHON_LIBRARY` in the CMake
function `get_filename_component()`, we loop over the content of the
relevant parts of `PYTHON_LIBRARY` and `PYTHON_DEBUG_LIBRARY` whether
they are lists or not.
Suggested-by: Brad King <brad.king@kitware.com>
Code extracted from:
https://gitlab.kitware.com/utils/kwsys.git
at commit 95a7e234ffd0c6bdfaa8b21c59a119198c050164 (master).
Upstream Shortlog
-----------------
Ben Boeckel (1):
e0967411 Add a script to help update third-party sources
Brad King (10):
98505f79 Add script to update GitSetup from upstream
365edba8 GitSetup: Tell Git not to export .gitattributes
41a7fe5b Add pre-commit hook to check whether SetupForDevelopment must re-run
17a1200c Convert developer setup scripts away from Gerrit Code Review
5f206c3a Tell Git to use a distinct conflict marker size in `.rst` files
33f828d4 README: Convert from `.txt` to `.rst` markup
56b707dd README: Add section about reporting bugs
140357ea CONTRIBUTING: Document contribution through the Kitware GitLab Instance
4b7bf8e4 Tell Git not to export any `.sh` or `.bash` scripts
e25eb8dc CONTRIBUTING: Add step for running developer setup script
GitSetup Upstream (3):
fed3d191 GitSetup 2012-09-27 (341043cf)
a0144297 GitSetup 2016-12-13 (8af10838)
868c1e68 GitSetup 2016-12-13 (cd5ada6d)
Revise the manual procedure in the `*Lexer.in.l` files. Some of our
post-processing steps are no longer necessary with the current set of
supported compilers. Some steps changed with newer versions of flex.
Then regenerate all lexers with flex version 2.6.1.
Do not assume that the implicit link line is the last line of the output
from `nvcc -v`. Instead first find the `LIBRARIES=` line, and then look
for that content on a later line. It appears twice. First on a call to
`nvlink`, which we ignore. Later it appears on the implicit link line.
Extract the latter line. On failure, abort with a `FATAL_ERROR` so that
the user does not try to build without proper link information.
Once we have the line, parse it with `separate_arguments` using the
`UNIX_COMMAND` option just like `CMakeParseImplicitLinkInfo` already
does. This robustly parses the command line and removes quoting.
Then extract the first argument as the host link launcher.
- Unify path handling: Rather than repeat the same logic for each
individual path create two macros which can be used throughout
the module.
- Capitalise helpstrings to match the conventions used by the
standard CMake properties