BUG: Do not complain about missing watched variables when they are accessd with IF(DEFINED VAR).
This commit is contained in:
parent
bdc7792e40
commit
b8928b0c8e
@ -315,7 +315,7 @@ bool cmIfCommand::IsTrue(const std::vector<std::string> &args,
|
||||
}
|
||||
else
|
||||
{
|
||||
def = makefile->GetDefinition((argP1)->c_str());
|
||||
def = makefile->GetDefinitionNoWatch((argP1)->c_str());
|
||||
}
|
||||
if(def)
|
||||
{
|
||||
|
@ -1633,7 +1633,7 @@ const char* cmMakefile::GetRequiredDefinition(const char* name) const
|
||||
return ret;
|
||||
}
|
||||
|
||||
const char* cmMakefile::GetDefinition(const char* name) const
|
||||
const char* cmMakefile::GetDefinitionNoWatch(const char* name) const
|
||||
{
|
||||
const char* def = 0;
|
||||
DefinitionMap::const_iterator pos = this->Definitions.find(name);
|
||||
@ -1645,6 +1645,12 @@ const char* cmMakefile::GetDefinition(const char* name) const
|
||||
{
|
||||
def = this->GetCacheManager()->GetCacheValue(name);
|
||||
}
|
||||
return def;
|
||||
}
|
||||
|
||||
const char* cmMakefile::GetDefinition(const char* name) const
|
||||
{
|
||||
const char* def = this->GetDefinitionNoWatch(name);
|
||||
#ifdef CMAKE_BUILD_WITH_CMAKE
|
||||
cmVariableWatch* vv = this->GetVariableWatch();
|
||||
if ( vv )
|
||||
|
@ -492,6 +492,7 @@ public:
|
||||
* cache is then queried.
|
||||
*/
|
||||
const char* GetDefinition(const char*) const;
|
||||
const char* GetDefinitionNoWatch(const char*) const;
|
||||
const char* GetSafeDefinition(const char*) const;
|
||||
const char* GetRequiredDefinition(const char* name) const;
|
||||
/**
|
||||
|
Loading…
x
Reference in New Issue
Block a user