|
@@ -135,13 +135,13 @@ static const struct NotNode : public cmGeneratorExpressionNode
|
|
const GeneratorExpressionContent* content,
|
|
const GeneratorExpressionContent* content,
|
|
cmGeneratorExpressionDAGChecker* /*dagChecker*/) const override
|
|
cmGeneratorExpressionDAGChecker* /*dagChecker*/) const override
|
|
{
|
|
{
|
|
- if (*parameters.begin() != "0" && *parameters.begin() != "1") {
|
|
|
|
|
|
+ if (parameters.front() != "0" && parameters.front() != "1") {
|
|
reportError(
|
|
reportError(
|
|
context, content->GetOriginalExpression(),
|
|
context, content->GetOriginalExpression(),
|
|
"$<NOT> parameter must resolve to exactly one '0' or '1' value.");
|
|
"$<NOT> parameter must resolve to exactly one '0' or '1' value.");
|
|
return std::string();
|
|
return std::string();
|
|
}
|
|
}
|
|
- return *parameters.begin() == "0" ? "1" : "0";
|
|
|
|
|
|
+ return parameters.front() == "0" ? "1" : "0";
|
|
}
|
|
}
|
|
} notNode;
|
|
} notNode;
|
|
|
|
|
|
@@ -157,7 +157,7 @@ static const struct BoolNode : public cmGeneratorExpressionNode
|
|
const GeneratorExpressionContent* /*content*/,
|
|
const GeneratorExpressionContent* /*content*/,
|
|
cmGeneratorExpressionDAGChecker* /*dagChecker*/) const override
|
|
cmGeneratorExpressionDAGChecker* /*dagChecker*/) const override
|
|
{
|
|
{
|
|
- return !cmSystemTools::IsOff(*parameters.begin()) ? "1" : "0";
|
|
|
|
|
|
+ return !cmSystemTools::IsOff(parameters.front()) ? "1" : "0";
|
|
}
|
|
}
|
|
} boolNode;
|
|
} boolNode;
|
|
|
|
|
|
@@ -194,7 +194,7 @@ static const struct StrEqualNode : public cmGeneratorExpressionNode
|
|
const GeneratorExpressionContent* /*content*/,
|
|
const GeneratorExpressionContent* /*content*/,
|
|
cmGeneratorExpressionDAGChecker* /*dagChecker*/) const override
|
|
cmGeneratorExpressionDAGChecker* /*dagChecker*/) const override
|
|
{
|
|
{
|
|
- return *parameters.begin() == parameters[1] ? "1" : "0";
|
|
|
|
|
|
+ return parameters.front() == parameters[1] ? "1" : "0";
|
|
}
|
|
}
|
|
} strEqualNode;
|
|
} strEqualNode;
|
|
|
|
|
|
@@ -613,7 +613,7 @@ struct CompilerIdNode : public cmGeneratorExpressionNode
|
|
return compilerId;
|
|
return compilerId;
|
|
}
|
|
}
|
|
static cmsys::RegularExpression compilerIdValidator("^[A-Za-z0-9_]*$");
|
|
static cmsys::RegularExpression compilerIdValidator("^[A-Za-z0-9_]*$");
|
|
- if (!compilerIdValidator.find(*parameters.begin())) {
|
|
|
|
|
|
+ if (!compilerIdValidator.find(parameters.front())) {
|
|
reportError(context, content->GetOriginalExpression(),
|
|
reportError(context, content->GetOriginalExpression(),
|
|
"Expression syntax not recognized.");
|
|
"Expression syntax not recognized.");
|
|
return std::string();
|
|
return std::string();
|
|
@@ -622,11 +622,11 @@ struct CompilerIdNode : public cmGeneratorExpressionNode
|
|
return parameters.front().empty() ? "1" : "0";
|
|
return parameters.front().empty() ? "1" : "0";
|
|
}
|
|
}
|
|
|
|
|
|
- if (strcmp(parameters.begin()->c_str(), compilerId.c_str()) == 0) {
|
|
|
|
|
|
+ if (strcmp(parameters.front().c_str(), compilerId.c_str()) == 0) {
|
|
return "1";
|
|
return "1";
|
|
}
|
|
}
|
|
|
|
|
|
- if (cmsysString_strcasecmp(parameters.begin()->c_str(),
|
|
|
|
|
|
+ if (cmsysString_strcasecmp(parameters.front().c_str(),
|
|
compilerId.c_str()) == 0) {
|
|
compilerId.c_str()) == 0) {
|
|
switch (context->LG->GetPolicyStatus(cmPolicies::CMP0044)) {
|
|
switch (context->LG->GetPolicyStatus(cmPolicies::CMP0044)) {
|
|
case cmPolicies::WARN: {
|
|
case cmPolicies::WARN: {
|
|
@@ -734,7 +734,7 @@ struct CompilerVersionNode : public cmGeneratorExpressionNode
|
|
}
|
|
}
|
|
|
|
|
|
static cmsys::RegularExpression compilerIdValidator("^[0-9\\.]*$");
|
|
static cmsys::RegularExpression compilerIdValidator("^[0-9\\.]*$");
|
|
- if (!compilerIdValidator.find(*parameters.begin())) {
|
|
|
|
|
|
+ if (!compilerIdValidator.find(parameters.front())) {
|
|
reportError(context, content->GetOriginalExpression(),
|
|
reportError(context, content->GetOriginalExpression(),
|
|
"Expression syntax not recognized.");
|
|
"Expression syntax not recognized.");
|
|
return std::string();
|
|
return std::string();
|
|
@@ -744,7 +744,7 @@ struct CompilerVersionNode : public cmGeneratorExpressionNode
|
|
}
|
|
}
|
|
|
|
|
|
return cmSystemTools::VersionCompare(cmSystemTools::OP_EQUAL,
|
|
return cmSystemTools::VersionCompare(cmSystemTools::OP_EQUAL,
|
|
- parameters.begin()->c_str(),
|
|
|
|
|
|
+ parameters.front().c_str(),
|
|
compilerVersion.c_str())
|
|
compilerVersion.c_str())
|
|
? "1"
|
|
? "1"
|
|
: "0";
|
|
: "0";
|
|
@@ -839,7 +839,7 @@ struct PlatformIdNode : public cmGeneratorExpressionNode
|
|
return parameters.front().empty() ? "1" : "0";
|
|
return parameters.front().empty() ? "1" : "0";
|
|
}
|
|
}
|
|
|
|
|
|
- if (*parameters.begin() == platformId) {
|
|
|
|
|
|
+ if (parameters.front() == platformId) {
|
|
return "1";
|
|
return "1";
|
|
}
|
|
}
|
|
return "0";
|
|
return "0";
|
|
@@ -1001,7 +1001,7 @@ static const struct ConfigurationTestNode : public cmGeneratorExpressionNode
|
|
return configurationNode.Evaluate(parameters, context, content, nullptr);
|
|
return configurationNode.Evaluate(parameters, context, content, nullptr);
|
|
}
|
|
}
|
|
static cmsys::RegularExpression configValidator("^[A-Za-z0-9_]*$");
|
|
static cmsys::RegularExpression configValidator("^[A-Za-z0-9_]*$");
|
|
- if (!configValidator.find(*parameters.begin())) {
|
|
|
|
|
|
+ if (!configValidator.find(parameters.front())) {
|
|
reportError(context, content->GetOriginalExpression(),
|
|
reportError(context, content->GetOriginalExpression(),
|
|
"Expression syntax not recognized.");
|
|
"Expression syntax not recognized.");
|
|
return std::string();
|
|
return std::string();
|
|
@@ -1011,7 +1011,7 @@ static const struct ConfigurationTestNode : public cmGeneratorExpressionNode
|
|
return parameters.front().empty() ? "1" : "0";
|
|
return parameters.front().empty() ? "1" : "0";
|
|
}
|
|
}
|
|
|
|
|
|
- if (cmsysString_strcasecmp(parameters.begin()->c_str(),
|
|
|
|
|
|
+ if (cmsysString_strcasecmp(parameters.front().c_str(),
|
|
context->Config.c_str()) == 0) {
|
|
context->Config.c_str()) == 0) {
|
|
return "1";
|
|
return "1";
|
|
}
|
|
}
|
|
@@ -1166,7 +1166,7 @@ static const struct TargetPropertyNode : public cmGeneratorExpressionNode
|
|
static cmsys::RegularExpression propertyNameValidator("^[A-Za-z0-9_]+$");
|
|
static cmsys::RegularExpression propertyNameValidator("^[A-Za-z0-9_]+$");
|
|
|
|
|
|
cmGeneratorTarget const* target = context->HeadTarget;
|
|
cmGeneratorTarget const* target = context->HeadTarget;
|
|
- std::string propertyName = *parameters.begin();
|
|
|
|
|
|
+ std::string propertyName = parameters.front();
|
|
|
|
|
|
if (parameters.size() == 1) {
|
|
if (parameters.size() == 1) {
|
|
context->HadHeadSensitiveCondition = true;
|
|
context->HadHeadSensitiveCondition = true;
|
|
@@ -1182,14 +1182,14 @@ static const struct TargetPropertyNode : public cmGeneratorExpressionNode
|
|
}
|
|
}
|
|
|
|
|
|
if (parameters.size() == 2) {
|
|
if (parameters.size() == 2) {
|
|
- if (parameters.begin()->empty() && parameters[1].empty()) {
|
|
|
|
|
|
+ if (parameters.front().empty() && parameters[1].empty()) {
|
|
reportError(
|
|
reportError(
|
|
context, content->GetOriginalExpression(),
|
|
context, content->GetOriginalExpression(),
|
|
"$<TARGET_PROPERTY:tgt,prop> expression requires a non-empty "
|
|
"$<TARGET_PROPERTY:tgt,prop> expression requires a non-empty "
|
|
"target name and property name.");
|
|
"target name and property name.");
|
|
return std::string();
|
|
return std::string();
|
|
}
|
|
}
|
|
- if (parameters.begin()->empty()) {
|
|
|
|
|
|
+ if (parameters.front().empty()) {
|
|
reportError(
|
|
reportError(
|
|
context, content->GetOriginalExpression(),
|
|
context, content->GetOriginalExpression(),
|
|
"$<TARGET_PROPERTY:tgt,prop> expression requires a non-empty "
|
|
"$<TARGET_PROPERTY:tgt,prop> expression requires a non-empty "
|
|
@@ -1964,7 +1964,7 @@ struct TargetFilesystemArtifact : public cmGeneratorExpressionNode
|
|
cmGeneratorExpressionDAGChecker* dagChecker) const override
|
|
cmGeneratorExpressionDAGChecker* dagChecker) const override
|
|
{
|
|
{
|
|
// Lookup the referenced target.
|
|
// Lookup the referenced target.
|
|
- std::string name = *parameters.begin();
|
|
|
|
|
|
+ std::string name = parameters.front();
|
|
|
|
|
|
if (!cmGeneratorExpression::IsValidTargetName(name)) {
|
|
if (!cmGeneratorExpression::IsValidTargetName(name)) {
|
|
::reportError(context, content->GetOriginalExpression(),
|
|
::reportError(context, content->GetOriginalExpression(),
|