diff options
author | Brad King <brad.king@kitware.com> | 2023-07-12 15:35:39 (GMT) |
---|---|---|
committer | Brad King <brad.king@kitware.com> | 2023-07-12 15:49:21 (GMT) |
commit | 861dd60ecf2e2bbe133708ea5bc55018931ee050 (patch) | |
tree | 95226c3004a23d2c48bd55f39ba8b11fdc72f00e /Source/cmGeneratorExpressionNode.cxx | |
parent | fbe5f49d63fe058277b41991cb025631093b25a2 (diff) | |
download | CMake-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.cxx | 4 |
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; |