summaryrefslogtreecommitdiffstats
path: root/Source/cmMakefile.cxx
diff options
context:
space:
mode:
authorStephen Kelly <steveire@gmail.com>2015-04-26 15:18:27 (GMT)
committerStephen Kelly <steveire@gmail.com>2015-04-28 05:50:01 (GMT)
commit410f39a43ef3ad900bcaed15e6838f97f034f0e7 (patch)
tree492d6e230ce14301b645980aded53e0e6bf80f19 /Source/cmMakefile.cxx
parent397b6298602f1496d1b946f5db827f5807d6ed23 (diff)
downloadCMake-410f39a43ef3ad900bcaed15e6838f97f034f0e7.zip
CMake-410f39a43ef3ad900bcaed15e6838f97f034f0e7.tar.gz
CMake-410f39a43ef3ad900bcaed15e6838f97f034f0e7.tar.bz2
cmMakefile: Delegate storage of Home dirs to the cmake class.
There is no need to duplicate these on every cmMakefile.
Diffstat (limited to 'Source/cmMakefile.cxx')
-rw-r--r--Source/cmMakefile.cxx21
1 files changed, 8 insertions, 13 deletions
diff --git a/Source/cmMakefile.cxx b/Source/cmMakefile.cxx
index c77a90c..c8b6849 100644
--- a/Source/cmMakefile.cxx
+++ b/Source/cmMakefile.cxx
@@ -181,11 +181,11 @@ void cmMakefile::Print() const
std::cout << " this->StartOutputDirectory; " <<
this->GetCurrentBinaryDirectory() << std::endl;
std::cout << " this->HomeOutputDirectory; " <<
- this->HomeOutputDirectory << std::endl;
+ this->GetHomeOutputDirectory() << std::endl;
std::cout << " this->cmStartDirectory; " <<
this->GetCurrentSourceDirectory() << std::endl;
std::cout << " this->cmHomeDirectory; " <<
- this->cmHomeDirectory << std::endl;
+ this->GetHomeDirectory() << std::endl;
std::cout << " this->ProjectName; "
<< this->ProjectName << std::endl;
this->PrintStringVector("this->LinkDirectories", this->LinkDirectories);
@@ -3382,34 +3382,29 @@ cmMakefile::LexicalPushPop::~LexicalPushPop()
const char* cmMakefile::GetHomeDirectory() const
{
- return this->cmHomeDirectory.c_str();
+ return this->GetCMakeInstance()->GetHomeDirectory();
}
void cmMakefile::SetHomeDirectory(const std::string& dir)
{
- this->cmHomeDirectory = dir;
- cmSystemTools::ConvertToUnixSlashes(this->cmHomeDirectory);
- this->AddDefinition("CMAKE_SOURCE_DIR", this->GetHomeDirectory());
+ this->AddDefinition("CMAKE_SOURCE_DIR", dir.c_str());
if ( !this->GetDefinition("CMAKE_CURRENT_SOURCE_DIR") )
{
- this->AddDefinition("CMAKE_CURRENT_SOURCE_DIR", this->GetHomeDirectory());
+ this->AddDefinition("CMAKE_CURRENT_SOURCE_DIR", dir.c_str());
}
}
const char* cmMakefile::GetHomeOutputDirectory() const
{
- return this->HomeOutputDirectory.c_str();
+ return this->GetCMakeInstance()->GetHomeOutputDirectory();
}
void cmMakefile::SetHomeOutputDirectory(const std::string& dir)
{
- this->HomeOutputDirectory = dir;
- cmSystemTools::ConvertToUnixSlashes(this->HomeOutputDirectory);
- this->AddDefinition("CMAKE_BINARY_DIR", this->GetHomeOutputDirectory());
+ this->AddDefinition("CMAKE_BINARY_DIR", dir.c_str());
if ( !this->GetDefinition("CMAKE_CURRENT_BINARY_DIR") )
{
- this->AddDefinition("CMAKE_CURRENT_BINARY_DIR",
- this->GetHomeOutputDirectory());
+ this->AddDefinition("CMAKE_CURRENT_BINARY_DIR", dir.c_str());
}
}