BUG: Moved definition of CMAKE_SOURCE_DIR and CMAKE_BINARY_DIR to be as soon as their information is known.
This commit is contained in:
parent
354992c522
commit
f84972610e
|
@ -388,10 +388,6 @@ std::string cmMakefile::GetParentListFileName(const char *currentFileName)
|
|||
|
||||
void cmMakefile::ExpandVariables()
|
||||
{
|
||||
// make sure binary and source dir are defined
|
||||
this->AddDefinition("CMAKE_BINARY_DIR", this->GetHomeOutputDirectory());
|
||||
this->AddDefinition("CMAKE_SOURCE_DIR", this->GetHomeDirectory());
|
||||
|
||||
// Now expand varibles in the include and link strings
|
||||
std::vector<std::string>::iterator j, begin, end;
|
||||
begin = m_IncludeDirectories.begin();
|
||||
|
|
|
@ -173,6 +173,7 @@ public:
|
|||
{
|
||||
m_cmHomeDirectory = dir;
|
||||
cmSystemTools::ConvertToUnixSlashes(m_cmHomeDirectory);
|
||||
this->AddDefinition("CMAKE_SOURCE_DIR", this->GetHomeDirectory());
|
||||
}
|
||||
const char* GetHomeDirectory()
|
||||
{
|
||||
|
@ -182,6 +183,7 @@ public:
|
|||
{
|
||||
m_HomeOutputDirectory = lib;
|
||||
cmSystemTools::ConvertToUnixSlashes(m_HomeOutputDirectory);
|
||||
this->AddDefinition("CMAKE_BINARY_DIR", this->GetHomeOutputDirectory());
|
||||
}
|
||||
const char* GetHomeOutputDirectory()
|
||||
{
|
||||
|
|
Loading…
Reference in New Issue