diff options
author | Brad King <brad.king@kitware.com> | 2020-01-13 15:29:03 (GMT) |
---|---|---|
committer | Kitware Robot <kwrobot@kitware.com> | 2020-01-13 15:29:10 (GMT) |
commit | 9a5d399725cbb7012ca7b1f77bd405090c60691d (patch) | |
tree | 852eed7bb5f729db64a03fd8ea3490390fc887c3 /Source | |
parent | 199e4203f74c8db9a385d6418e6b83e6c0bdddf2 (diff) | |
parent | 09721ca0787e3753e6b294c9bd57ca39ef91c230 (diff) | |
download | CMake-9a5d399725cbb7012ca7b1f77bd405090c60691d.zip CMake-9a5d399725cbb7012ca7b1f77bd405090c60691d.tar.gz CMake-9a5d399725cbb7012ca7b1f77bd405090c60691d.tar.bz2 |
Merge topic 'out-of-dir-link-keyword'
09721ca078 target_link_libraries: Fix out-of-dir calls with debug/optimized keywords
c40229968c target_link_libraries: Add FIXME comment for out-of-dir genex list
Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !4202
Diffstat (limited to 'Source')
-rw-r--r-- | Source/cmMakefile.cxx | 2 | ||||
-rw-r--r-- | Source/cmTargetLinkLibrariesCommand.cxx | 4 |
2 files changed, 5 insertions, 1 deletions
diff --git a/Source/cmMakefile.cxx b/Source/cmMakefile.cxx index fa7bce1..79cf5a1 100644 --- a/Source/cmMakefile.cxx +++ b/Source/cmMakefile.cxx @@ -139,7 +139,7 @@ cmDirectoryId cmMakefile::GetDirectoryId() const // If we ever need to expose this to CMake language code we should // add a read-only property in cmMakefile::GetProperty. char buf[32]; - sprintf(buf, "<%p>", + sprintf(buf, "(%p)", static_cast<void const*>(this)); // cast avoids format warning return std::string(buf); } diff --git a/Source/cmTargetLinkLibrariesCommand.cxx b/Source/cmTargetLinkLibrariesCommand.cxx index e1ac6a8..ad59748 100644 --- a/Source/cmTargetLinkLibrariesCommand.cxx +++ b/Source/cmTargetLinkLibrariesCommand.cxx @@ -406,6 +406,10 @@ static bool HandleLibrary(cmMakefile& mf, cmTarget* target, // the name to tell ResolveLinkItem to look up the name in the // caller's directory. cmDirectoryId const dirId = mf.GetDirectoryId(); + // FIXME: The "lib" may be a genex with a list inside it. + // After expansion this id will only attach to the last entry, + // or may attach to an empty string! We will need another way + // to encode this that can apply to a whole list. See issue #20204. libRef = lib + CMAKE_DIRECTORY_ID_SEP + dirId.String; } else { // This is an absolute path or a library name added by a caller |