summaryrefslogtreecommitdiff
path: root/Source/cmGeneratorTarget.cxx
diff options
context:
space:
mode:
authorMarc Chevrier <marc.chevrier@gmail.com>2022-12-20 12:20:48 +0100
committerMarc Chevrier <marc.chevrier@gmail.com>2022-12-20 12:20:48 +0100
commit74638c47ff238f15ee7548f1084e3e9297c5395d (patch)
tree7a43bae2523e67d75d698d4caa696615830242b7 /Source/cmGeneratorTarget.cxx
parent87aeb2f563d3a80c711e77a569a8a76cc119b946 (diff)
downloadcmake-74638c47ff238f15ee7548f1084e3e9297c5395d.tar.gz
STATIC_LIBRARY_OPTIONS: ensure correct expension of list inside a genex
Fixes: #24258
Diffstat (limited to 'Source/cmGeneratorTarget.cxx')
-rw-r--r--Source/cmGeneratorTarget.cxx11
1 files changed, 4 insertions, 7 deletions
diff --git a/Source/cmGeneratorTarget.cxx b/Source/cmGeneratorTarget.cxx
index 7ecdd8781a..d0d339d4e2 100644
--- a/Source/cmGeneratorTarget.cxx
+++ b/Source/cmGeneratorTarget.cxx
@@ -4856,13 +4856,10 @@ std::vector<BT<std::string>> cmGeneratorTarget::GetStaticLibraryLinkOptions(
EvaluatedTargetPropertyEntries entries;
if (cmValue linkOptions = this->GetProperty("STATIC_LIBRARY_OPTIONS")) {
- std::vector<std::string> options = cmExpandedList(*linkOptions);
- for (const auto& option : options) {
- std::unique_ptr<TargetPropertyEntry> entry = CreateTargetPropertyEntry(
- *this->LocalGenerator->GetCMakeInstance(), option);
- entries.Entries.emplace_back(EvaluateTargetPropertyEntry(
- this, config, language, &dagChecker, *entry));
- }
+ std::unique_ptr<TargetPropertyEntry> entry = CreateTargetPropertyEntry(
+ *this->LocalGenerator->GetCMakeInstance(), *linkOptions);
+ entries.Entries.emplace_back(EvaluateTargetPropertyEntry(
+ this, config, language, &dagChecker, *entry));
}
processOptions(this, entries, result, uniqueOptions, false,
"static library link options", OptionsParse::Shell);