mirror of
https://github.com/Kitware/CMake.git
synced 2026-01-06 05:40:54 -06:00
Genex: PlatformId now can match against a list of ids.
This commit is contained in:
committed by
Brad King
parent
ec66af2026
commit
9fd602bfd3
@@ -776,7 +776,7 @@ struct PlatformIdNode : public cmGeneratorExpressionNode
|
||||
{
|
||||
PlatformIdNode() {} // NOLINT(modernize-use-equals-default)
|
||||
|
||||
int NumExpectedParameters() const override { return OneOrZeroParameters; }
|
||||
int NumExpectedParameters() const override { return ZeroOrMoreParameters; }
|
||||
|
||||
std::string Evaluate(
|
||||
const std::vector<std::string>& parameters,
|
||||
@@ -794,8 +794,10 @@ struct PlatformIdNode : public cmGeneratorExpressionNode
|
||||
return parameters.front().empty() ? "1" : "0";
|
||||
}
|
||||
|
||||
if (parameters.front() == platformId) {
|
||||
return "1";
|
||||
for (auto& param : parameters) {
|
||||
if (param == platformId) {
|
||||
return "1";
|
||||
}
|
||||
}
|
||||
return "0";
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user