diff options
author | Brad King <brad.king@kitware.com> | 2022-12-16 14:04:41 (GMT) |
---|---|---|
committer | Kitware Robot <kwrobot@kitware.com> | 2022-12-16 14:04:49 (GMT) |
commit | eec3aa11fc2589fad1d257b66ff6b85d63ed0e33 (patch) | |
tree | 14e88a0a4790a38e27180e6bdd3dbf31b9cf0b09 /Source | |
parent | d993b48a67c8971861adfd54a809e6336110d5f8 (diff) | |
parent | e455265d72e42ccf47c27dc5068f664f9e84012d (diff) | |
download | CMake-eec3aa11fc2589fad1d257b66ff6b85d63ed0e33.zip CMake-eec3aa11fc2589fad1d257b66ff6b85d63ed0e33.tar.gz CMake-eec3aa11fc2589fad1d257b66ff6b85d63ed0e33.tar.bz2 |
Merge topic 'genex-config-mapping-imported-targets'
e455265d72 Genex: Fix CONFIG on imported target with no explicit mapping
Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !8016
Diffstat (limited to 'Source')
-rw-r--r-- | Source/cmGeneratorExpressionNode.cxx | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/Source/cmGeneratorExpressionNode.cxx b/Source/cmGeneratorExpressionNode.cxx index c14012e..e33ebd7 100644 --- a/Source/cmGeneratorExpressionNode.cxx +++ b/Source/cmGeneratorExpressionNode.cxx @@ -1388,6 +1388,14 @@ static const struct ConfigurationTestNode : public cmGeneratorExpressionNode return "1"; } } + } else if (!suffix.empty()) { + // There is no explicit mapping for the tested config, so use + // the configuration of the imported location that was selected. + for (auto const& param : parameters) { + if (cmStrCat('_', cmSystemTools::UpperCase(param)) == suffix) { + return "1"; + } + } } } } |