summaryrefslogtreecommitdiffstats
path: root/Source/cmGeneratorExpressionNode.cxx
diff options
context:
space:
mode:
authorBrad King <brad.king@kitware.com>2023-07-12 15:35:39 (GMT)
committerBrad King <brad.king@kitware.com>2023-07-12 15:49:21 (GMT)
commit861dd60ecf2e2bbe133708ea5bc55018931ee050 (patch)
tree95226c3004a23d2c48bd55f39ba8b11fdc72f00e /Source/cmGeneratorExpressionNode.cxx
parentfbe5f49d63fe058277b41991cb025631093b25a2 (diff)
downloadCMake-861dd60ecf2e2bbe133708ea5bc55018931ee050.zip
CMake-861dd60ecf2e2bbe133708ea5bc55018931ee050.tar.gz
CMake-861dd60ecf2e2bbe133708ea5bc55018931ee050.tar.bz2
Genex: Restore REMOVE_DUPLICATES preservation of empty elements
Refactoring in commit 72d116ee68 (GenEx: list oriented genexes use cmList class, 2023-03-29, v3.27.0-rc1~205^2) accidentally caused empty elements to be dropped by the `REMOVE_DUPLICATES` genex. Fix it and add a test case. Fixes: #25080
Diffstat (limited to 'Source/cmGeneratorExpressionNode.cxx')
-rw-r--r--Source/cmGeneratorExpressionNode.cxx4
1 files changed, 3 insertions, 1 deletions
diff --git a/Source/cmGeneratorExpressionNode.cxx b/Source/cmGeneratorExpressionNode.cxx
index bb4fc7e..7fe814a 100644
--- a/Source/cmGeneratorExpressionNode.cxx
+++ b/Source/cmGeneratorExpressionNode.cxx
@@ -384,7 +384,9 @@ static const struct RemoveDuplicatesNode : public cmGeneratorExpressionNode
"$<REMOVE_DUPLICATES:...> expression requires one parameter");
}
- return cmList{ parameters.front() }.remove_duplicates().to_string();
+ return cmList{ parameters.front(), cmList::EmptyElements::Yes }
+ .remove_duplicates()
+ .to_string();
}
} removeDuplicatesNode;