|
@@ -494,12 +494,12 @@ bool cmConditionEvaluator::HandleLevel1(cmArgumentList& newArgs, std::string&,
|
|
|
if (this->IsKeyword(keyDEFINED, *arg) && argP1 != newArgs.end()) {
|
|
if (this->IsKeyword(keyDEFINED, *arg) && argP1 != newArgs.end()) {
|
|
|
size_t argP1len = argP1->GetValue().size();
|
|
size_t argP1len = argP1->GetValue().size();
|
|
|
bool bdef = false;
|
|
bool bdef = false;
|
|
|
- if (argP1len > 4 && argP1->GetValue().substr(0, 4) == "ENV{" &&
|
|
|
|
|
|
|
+ if (argP1len > 4 && cmHasLiteralPrefix(argP1->GetValue(), "ENV{") &&
|
|
|
argP1->GetValue().operator[](argP1len - 1) == '}') {
|
|
argP1->GetValue().operator[](argP1len - 1) == '}') {
|
|
|
std::string env = argP1->GetValue().substr(4, argP1len - 5);
|
|
std::string env = argP1->GetValue().substr(4, argP1len - 5);
|
|
|
bdef = cmSystemTools::HasEnv(env);
|
|
bdef = cmSystemTools::HasEnv(env);
|
|
|
} else if (argP1len > 6 &&
|
|
} else if (argP1len > 6 &&
|
|
|
- argP1->GetValue().substr(0, 6) == "CACHE{" &&
|
|
|
|
|
|
|
+ cmHasLiteralPrefix(argP1->GetValue(), "CACHE{") &&
|
|
|
argP1->GetValue().operator[](argP1len - 1) == '}') {
|
|
argP1->GetValue().operator[](argP1len - 1) == '}') {
|
|
|
std::string cache = argP1->GetValue().substr(6, argP1len - 7);
|
|
std::string cache = argP1->GetValue().substr(6, argP1len - 7);
|
|
|
bdef =
|
|
bdef =
|