diff options
author | Stephen Kelly <steveire@gmail.com> | 2015-05-04 21:08:19 (GMT) |
---|---|---|
committer | Stephen Kelly <steveire@gmail.com> | 2015-05-16 06:12:01 (GMT) |
commit | 991f5e4968ce7b86aea12224b4cecc1be3ed92d9 (patch) | |
tree | ed86360fdaa42be85834ef9da62fdf23c3e15c7e /Source/cmLocalGenerator.cxx | |
parent | 57bdc1a2f7d416c106c4bef8f3543eec74c3c391 (diff) | |
download | CMake-991f5e4968ce7b86aea12224b4cecc1be3ed92d9.zip CMake-991f5e4968ce7b86aea12224b4cecc1be3ed92d9.tar.gz CMake-991f5e4968ce7b86aea12224b4cecc1be3ed92d9.tar.bz2 |
cmState::Snapshot: Store components for current directories.
Remove this responsibility from cmLocalGenerator.
Diffstat (limited to 'Source/cmLocalGenerator.cxx')
-rw-r--r-- | Source/cmLocalGenerator.cxx | 38 |
1 files changed, 6 insertions, 32 deletions
diff --git a/Source/cmLocalGenerator.cxx b/Source/cmLocalGenerator.cxx index a26a90f..4e4970d 100644 --- a/Source/cmLocalGenerator.cxx +++ b/Source/cmLocalGenerator.cxx @@ -67,7 +67,6 @@ cmLocalGenerator::cmLocalGenerator(cmGlobalGenerator* gg, this->Configured = false; this->EmitUniversalBinaryFlags = true; this->RelativePathsConfigured = false; - this->PathConversionsSetup = false; this->BackwardsCompatibility = 0; this->BackwardsCompatibilityFinal = false; } @@ -196,22 +195,6 @@ void cmLocalGenerator::ReadInputFile() this->Makefile->ProcessBuildsystemFile(currentStart.c_str()); } -void cmLocalGenerator::SetupPathConversions() -{ - // Setup the current output directory components for use by - // Convert - std::string outdir; - - outdir = cmSystemTools::CollapseFullPath( - this->StateSnapshot.GetCurrentSourceDirectory()); - cmSystemTools::SplitPath(outdir, this->StartDirectoryComponents); - - outdir = cmSystemTools::CollapseFullPath - (this->StateSnapshot.GetCurrentBinaryDirectory()); - cmSystemTools::SplitPath(outdir, - this->StartOutputDirectoryComponents); -} - void cmLocalGenerator::ConfigureFinalPass() { this->Makefile->ConfigureFinalPass(); @@ -2698,13 +2681,6 @@ std::string cmLocalGenerator::Convert(const std::string& source, OutputFormat output, bool optional) { - // Make sure the relative path conversion components are set. - if(!this->PathConversionsSetup) - { - this->SetupPathConversions(); - this->PathConversionsSetup = true; - } - // Convert the path to a relative path. std::string result = source; @@ -2719,20 +2695,18 @@ std::string cmLocalGenerator::Convert(const std::string& source, break; case START: //result = cmSystemTools::CollapseFullPath(result.c_str()); - result = this->ConvertToRelativePath(this->StartDirectoryComponents, - result); + result = this->ConvertToRelativePath( + this->StateSnapshot.GetCurrentSourceDirectoryComponents(), result); break; case HOME_OUTPUT: //result = cmSystemTools::CollapseFullPath(result.c_str()); - result = - this->ConvertToRelativePath( - this->GetState()->GetBinaryDirectoryComponents(), result); + result = this->ConvertToRelativePath( + this->GetState()->GetBinaryDirectoryComponents(), result); break; case START_OUTPUT: //result = cmSystemTools::CollapseFullPath(result.c_str()); - result = - this->ConvertToRelativePath(this->StartOutputDirectoryComponents, - result); + result = this->ConvertToRelativePath( + this->StateSnapshot.GetCurrentBinaryDirectoryComponents(), result); break; case FULL: result = cmSystemTools::CollapseFullPath(result); |