cmMakefile: Remove redundant condition.

As this is called in the constructor, the definition will never be already
set.
This commit is contained in:
Stephen Kelly 2015-05-02 10:25:13 +02:00
parent 8ab1cce704
commit 390bc3244f
1 changed files with 2 additions and 8 deletions

View File

@ -230,18 +230,12 @@ cmMakefile::cmMakefile(cmLocalGenerator* localGenerator)
{
const char* dir = this->GetCMakeInstance()->GetHomeDirectory();
this->AddDefinition("CMAKE_SOURCE_DIR", dir);
if ( !this->GetDefinition("CMAKE_CURRENT_SOURCE_DIR") )
{
this->AddDefinition("CMAKE_CURRENT_SOURCE_DIR", dir);
}
this->AddDefinition("CMAKE_CURRENT_SOURCE_DIR", dir);
}
{
const char* dir = this->GetCMakeInstance()->GetHomeOutputDirectory();
this->AddDefinition("CMAKE_BINARY_DIR", dir);
if ( !this->GetDefinition("CMAKE_CURRENT_BINARY_DIR") )
{
this->AddDefinition("CMAKE_CURRENT_BINARY_DIR", dir);
}
this->AddDefinition("CMAKE_CURRENT_BINARY_DIR", dir);
}
}