define_property(): Only test prefix if INITIALIZE_FROM_VARIABLE is given
This commit is contained in:
parent
9b50f221f6
commit
87c3b5e421
@ -97,7 +97,6 @@ bool cmDefinePropertyCommand(std::vector<std::string> const& args,
|
||||
PropertyName, "\""));
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
// Make sure the variable is not reserved.
|
||||
static constexpr const char* reservedPrefixes[] = {
|
||||
@ -108,10 +107,11 @@ bool cmDefinePropertyCommand(std::vector<std::string> const& args,
|
||||
[&initializeFromVariable](const char* prefix) {
|
||||
return cmHasPrefix(initializeFromVariable, prefix);
|
||||
})) {
|
||||
status.SetError(
|
||||
cmStrCat("variable name \"", initializeFromVariable, "\" is reserved"));
|
||||
status.SetError(cmStrCat("variable name \"", initializeFromVariable,
|
||||
"\" is reserved"));
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
// Actually define the property.
|
||||
status.GetMakefile().GetState()->DefineProperty(
|
||||
|
Loading…
Reference in New Issue
Block a user