diff options
author | Stephen Kelly <steveire@gmail.com> | 2015-05-04 21:01:29 (GMT) |
---|---|---|
committer | Stephen Kelly <steveire@gmail.com> | 2015-05-16 06:11:33 (GMT) |
commit | 57bdc1a2f7d416c106c4bef8f3543eec74c3c391 (patch) | |
tree | 35f8d079bab6b86e79472663bd6a582fab2be7fa /Source/cmLocalGenerator.cxx | |
parent | ebf8a41984f591dbd6c22735aec7f2b1c36c9e0a (diff) | |
download | CMake-57bdc1a2f7d416c106c4bef8f3543eec74c3c391.zip CMake-57bdc1a2f7d416c106c4bef8f3543eec74c3c391.tar.gz CMake-57bdc1a2f7d416c106c4bef8f3543eec74c3c391.tar.bz2 |
cmState: Compute and store directory components.
There is no need to duplicate these in all cmLocalGenerators.
Rename the symbols according to current conventions.
Add explicit calls to Set{Source,Binary}Directory with empty strings
in order to trigger the population of the components containers with
the current working directory in cmLocalGenerator. Having
directories set to empty is a special case in CMake, which is relied
on for the `if(CMAKE_BINARY_DIR)` condition at the end of
CMakeDetermineSystem.cmake.
Diffstat (limited to 'Source/cmLocalGenerator.cxx')
-rw-r--r-- | Source/cmLocalGenerator.cxx | 17 |
1 files changed, 5 insertions, 12 deletions
diff --git a/Source/cmLocalGenerator.cxx b/Source/cmLocalGenerator.cxx index 74362ae..a26a90f 100644 --- a/Source/cmLocalGenerator.cxx +++ b/Source/cmLocalGenerator.cxx @@ -201,19 +201,12 @@ void cmLocalGenerator::SetupPathConversions() // Setup the current output directory components for use by // Convert std::string outdir; - outdir = - cmSystemTools::CollapseFullPath(this->GetState()->GetSourceDirectory()); - cmSystemTools::SplitPath(outdir, this->HomeDirectoryComponents); + outdir = cmSystemTools::CollapseFullPath( this->StateSnapshot.GetCurrentSourceDirectory()); cmSystemTools::SplitPath(outdir, this->StartDirectoryComponents); outdir = cmSystemTools::CollapseFullPath - (this->GetState()->GetBinaryDirectory()); - cmSystemTools::SplitPath(outdir, - this->HomeOutputDirectoryComponents); - - outdir = cmSystemTools::CollapseFullPath (this->StateSnapshot.GetCurrentBinaryDirectory()); cmSystemTools::SplitPath(outdir, this->StartOutputDirectoryComponents); @@ -2721,8 +2714,8 @@ std::string cmLocalGenerator::Convert(const std::string& source, { case HOME: //result = cmSystemTools::CollapseFullPath(result.c_str()); - result = this->ConvertToRelativePath(this->HomeDirectoryComponents, - result); + result = this->ConvertToRelativePath( + this->GetState()->GetSourceDirectoryComponents(), result); break; case START: //result = cmSystemTools::CollapseFullPath(result.c_str()); @@ -2732,8 +2725,8 @@ std::string cmLocalGenerator::Convert(const std::string& source, case HOME_OUTPUT: //result = cmSystemTools::CollapseFullPath(result.c_str()); result = - this->ConvertToRelativePath(this->HomeOutputDirectoryComponents, - result); + this->ConvertToRelativePath( + this->GetState()->GetBinaryDirectoryComponents(), result); break; case START_OUTPUT: //result = cmSystemTools::CollapseFullPath(result.c_str()); |