From 3a68c323ba4b9f269fe9fe45fc2a1bcc2de4ac89 Mon Sep 17 00:00:00 2001 From: Stephen Kelly Date: Thu, 16 Apr 2015 00:19:35 +0200 Subject: cmMakefile: Fix wrong parameter names. --- Source/cmMakefile.cxx | 4 ++-- Source/cmMakefile.h | 6 +++--- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/Source/cmMakefile.cxx b/Source/cmMakefile.cxx index 7be920d..6c2b8b2 100644 --- a/Source/cmMakefile.cxx +++ b/Source/cmMakefile.cxx @@ -3408,9 +3408,9 @@ const char* cmMakefile::GetHomeOutputDirectory() const return this->HomeOutputDirectory.c_str(); } -void cmMakefile::SetHomeOutputDirectory(const std::string& lib) +void cmMakefile::SetHomeOutputDirectory(const std::string& dir) { - this->HomeOutputDirectory = lib; + this->HomeOutputDirectory = dir; cmSystemTools::ConvertToUnixSlashes(this->HomeOutputDirectory); this->AddDefinition("CMAKE_BINARY_DIR", this->GetHomeOutputDirectory()); if ( !this->GetDefinition("CMAKE_CURRENT_BINARY_DIR") ) diff --git a/Source/cmMakefile.h b/Source/cmMakefile.h index 73d6910..8da2ccd 100644 --- a/Source/cmMakefile.h +++ b/Source/cmMakefile.h @@ -441,7 +441,7 @@ public: */ void SetHomeDirectory(const std::string& dir); const char* GetHomeDirectory() const; - void SetHomeOutputDirectory(const std::string& lib); + void SetHomeOutputDirectory(const std::string& dir); const char* GetHomeOutputDirectory() const; //@} @@ -476,9 +476,9 @@ public: { return this->cmStartDirectory.c_str(); } - void SetStartOutputDirectory(const std::string& lib) + void SetStartOutputDirectory(const std::string& dir) { - this->StartOutputDirectory = lib; + this->StartOutputDirectory = dir; cmSystemTools::ConvertToUnixSlashes(this->StartOutputDirectory); this->StartOutputDirectory = cmSystemTools::CollapseFullPath(this->StartOutputDirectory); -- cgit v0.12 From f034bb2f54f784461ed1adea8f0554d49ff5b0b3 Mon Sep 17 00:00:00 2001 From: Stephen Kelly Date: Sun, 12 Apr 2015 18:54:42 +0200 Subject: Remove redundant calls to MakeStartDirectoriesCurrent. The SetStart{,Output}Directory methods do what it does. --- Source/cmGlobalGenerator.cxx | 1 - Source/cmGlobalUnixMakefileGenerator3.cxx | 1 - Source/cmcmd.cxx | 1 - 3 files changed, 3 deletions(-) diff --git a/Source/cmGlobalGenerator.cxx b/Source/cmGlobalGenerator.cxx index 4a9f628..0492a4c 100644 --- a/Source/cmGlobalGenerator.cxx +++ b/Source/cmGlobalGenerator.cxx @@ -1103,7 +1103,6 @@ void cmGlobalGenerator::Configure() (this->CMakeInstance->GetStartDirectory()); lg->GetMakefile()->SetStartOutputDirectory (this->CMakeInstance->GetStartOutputDirectory()); - lg->GetMakefile()->MakeStartDirectoriesCurrent(); this->BinaryDirectories.insert(mf->GetStartOutputDirectory()); diff --git a/Source/cmGlobalUnixMakefileGenerator3.cxx b/Source/cmGlobalUnixMakefileGenerator3.cxx index 22d633c..3deaec2 100644 --- a/Source/cmGlobalUnixMakefileGenerator3.cxx +++ b/Source/cmGlobalUnixMakefileGenerator3.cxx @@ -587,7 +587,6 @@ void cmGlobalUnixMakefileGenerator3 (this->CMakeInstance->GetStartDirectory()); lg->GetMakefile()->SetStartOutputDirectory (this->CMakeInstance->GetStartOutputDirectory()); - lg->GetMakefile()->MakeStartDirectoriesCurrent(); } std::string tname = targetName; diff --git a/Source/cmcmd.cxx b/Source/cmcmd.cxx index 2ef04ef..db85b59 100644 --- a/Source/cmcmd.cxx +++ b/Source/cmcmd.cxx @@ -651,7 +651,6 @@ int cmcmd::ExecuteCMakeCommand(std::vector& args) cmsys::auto_ptr lgd(ggd->CreateLocalGenerator()); lgd->GetMakefile()->SetStartDirectory(startDir); lgd->GetMakefile()->SetStartOutputDirectory(startOutDir); - lgd->GetMakefile()->MakeStartDirectoriesCurrent(); // Actually scan dependencies. return lgd->UpdateDependencies(depInfo.c_str(), -- cgit v0.12 From 1ea085d1b62f02d4e556ce1fabb0589e30108e20 Mon Sep 17 00:00:00 2001 From: Stephen Kelly Date: Thu, 16 Apr 2015 22:18:04 +0200 Subject: cmMakefile: Initialize dir definitions early. --- Source/cmMakefile.cxx | 6 +++++- Source/cmMakefile.h | 8 -------- 2 files changed, 5 insertions(+), 9 deletions(-) diff --git a/Source/cmMakefile.cxx b/Source/cmMakefile.cxx index 6c2b8b2..23c2e48 100644 --- a/Source/cmMakefile.cxx +++ b/Source/cmMakefile.cxx @@ -1543,6 +1543,11 @@ void cmMakefile::InitializeFromParent() // Initialize definitions with the closure of the parent scope. this->Internal->VarStack.top() = parent->Internal->VarStack.top().Closure(); + this->AddDefinition("CMAKE_CURRENT_SOURCE_DIR", + this->cmStartDirectory.c_str()); + this->AddDefinition("CMAKE_CURRENT_BINARY_DIR", + this->StartOutputDirectory.c_str()); + const std::vector& parentIncludes = parent->GetIncludeDirectoriesEntries(); this->IncludeDirectoriesEntries.insert(this->IncludeDirectoriesEntries.end(), @@ -1611,7 +1616,6 @@ void cmMakefile::InitializeFromParent() void cmMakefile::ConfigureSubDirectory(cmLocalGenerator *lg2) { lg2->GetMakefile()->InitializeFromParent(); - lg2->GetMakefile()->MakeStartDirectoriesCurrent(); if (this->GetCMakeInstance()->GetDebugOutput()) { std::string msg=" Entering "; diff --git a/Source/cmMakefile.h b/Source/cmMakefile.h index 8da2ccd..356e4c2 100644 --- a/Source/cmMakefile.h +++ b/Source/cmMakefile.h @@ -423,14 +423,6 @@ public: bool HasCMP0054AlreadyBeenReported( cmListFileContext context) const; - void MakeStartDirectoriesCurrent() - { - this->AddDefinition("CMAKE_CURRENT_SOURCE_DIR", - this->cmStartDirectory.c_str()); - this->AddDefinition("CMAKE_CURRENT_BINARY_DIR", - this->StartOutputDirectory.c_str()); - } - //@{ /** * Set/Get the home directory (or output directory) in the project. The -- cgit v0.12 From d67e8f24b89b70782c977b4db628377be875f938 Mon Sep 17 00:00:00 2001 From: Stephen Kelly Date: Thu, 16 Apr 2015 00:39:33 +0200 Subject: cmake: Fix directory used to find the cache The start and home directories are the same, but the intent of the code here is to use what is currently called the HomeOutput directory. --- Source/cmake.cxx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Source/cmake.cxx b/Source/cmake.cxx index d113c9f..bf05b18 100644 --- a/Source/cmake.cxx +++ b/Source/cmake.cxx @@ -1189,7 +1189,7 @@ int cmake::HandleDeleteCacheVariables(const std::string& var) } // remove the cache - this->CacheManager->DeleteCache(this->GetStartOutputDirectory()); + this->CacheManager->DeleteCache(this->GetHomeOutputDirectory()); // load the empty cache this->LoadCache(); // restore the changed compilers -- cgit v0.12 From 044dc81504e0d34d7c84a20d333b2177a2c86b54 Mon Sep 17 00:00:00 2001 From: Stephen Kelly Date: Thu, 16 Apr 2015 00:50:59 +0200 Subject: Use the Home directories from the cmake class where intended. --- Source/cmGlobalGenerator.cxx | 10 +++++----- Source/cmGlobalUnixMakefileGenerator3.cxx | 4 ++-- 2 files changed, 7 insertions(+), 7 deletions(-) diff --git a/Source/cmGlobalGenerator.cxx b/Source/cmGlobalGenerator.cxx index 0492a4c..786f8fa 100644 --- a/Source/cmGlobalGenerator.cxx +++ b/Source/cmGlobalGenerator.cxx @@ -1098,13 +1098,13 @@ void cmGlobalGenerator::Configure() this->LocalGenerators.push_back(lg); // set the Start directories - cmMakefile* mf = lg->GetMakefile(); lg->GetMakefile()->SetStartDirectory - (this->CMakeInstance->GetStartDirectory()); + (this->CMakeInstance->GetHomeDirectory()); lg->GetMakefile()->SetStartOutputDirectory - (this->CMakeInstance->GetStartOutputDirectory()); + (this->CMakeInstance->GetHomeOutputDirectory()); - this->BinaryDirectories.insert(mf->GetStartOutputDirectory()); + this->BinaryDirectories.insert( + this->CMakeInstance->GetHomeOutputDirectory()); // now do it lg->Configure(); @@ -3069,7 +3069,7 @@ bool cmGlobalGenerator::GenerateCPackPropertiesFile() std::vector configs; std::string config = mf->GetConfigurations(configs, false); - std::string path = this->CMakeInstance->GetStartOutputDirectory(); + std::string path = this->CMakeInstance->GetHomeOutputDirectory(); path += "/CPackProperties.cmake"; if(!cmSystemTools::FileExists(path.c_str()) && installedFiles.empty()) diff --git a/Source/cmGlobalUnixMakefileGenerator3.cxx b/Source/cmGlobalUnixMakefileGenerator3.cxx index 3deaec2..73d3dc2 100644 --- a/Source/cmGlobalUnixMakefileGenerator3.cxx +++ b/Source/cmGlobalUnixMakefileGenerator3.cxx @@ -584,9 +584,9 @@ void cmGlobalUnixMakefileGenerator3 (this->CreateLocalGenerator()); // set the Start directories lg->GetMakefile()->SetStartDirectory - (this->CMakeInstance->GetStartDirectory()); + (this->CMakeInstance->GetHomeDirectory()); lg->GetMakefile()->SetStartOutputDirectory - (this->CMakeInstance->GetStartOutputDirectory()); + (this->CMakeInstance->GetHomeOutputDirectory()); } std::string tname = targetName; -- cgit v0.12 From 8878bea7b6a157948bb7c806523b1cfa4c9f7af8 Mon Sep 17 00:00:00 2001 From: Stephen Kelly Date: Thu, 16 Apr 2015 21:09:16 +0200 Subject: cmake: Initialize Home directories on cmake for find-package mode. The Home directories can be used to initialize cmMakefile directories internally. --- Source/cmake.cxx | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/Source/cmake.cxx b/Source/cmake.cxx index bf05b18..f0fc4f0 100644 --- a/Source/cmake.cxx +++ b/Source/cmake.cxx @@ -405,6 +405,11 @@ void cmake::ReadListFile(const std::vector& args, bool cmake::FindPackage(const std::vector& args) { + this->SetHomeDirectory + (cmSystemTools::GetCurrentWorkingDirectory()); + this->SetHomeOutputDirectory + (cmSystemTools::GetCurrentWorkingDirectory()); + // if a generator was not yet created, temporarily create one cmGlobalGenerator *gg = new cmGlobalGenerator; gg->SetCMakeInstance(this); @@ -413,12 +418,8 @@ bool cmake::FindPackage(const std::vector& args) // read in the list file to fill the cache cmsys::auto_ptr lg(gg->CreateLocalGenerator()); cmMakefile* mf = lg->GetMakefile(); - mf->SetHomeOutputDirectory - (cmSystemTools::GetCurrentWorkingDirectory()); mf->SetStartOutputDirectory (cmSystemTools::GetCurrentWorkingDirectory()); - mf->SetHomeDirectory - (cmSystemTools::GetCurrentWorkingDirectory()); mf->SetStartDirectory (cmSystemTools::GetCurrentWorkingDirectory()); -- cgit v0.12 From fcf246acd18dd168d9909cd33b191a3e6c9881e0 Mon Sep 17 00:00:00 2001 From: Stephen Kelly Date: Thu, 16 Apr 2015 21:47:14 +0200 Subject: cmMakefile: Populate Home directories on initialize. --- Source/cmLocalGenerator.cxx | 6 ------ Source/cmMakefile.cxx | 3 +++ 2 files changed, 3 insertions(+), 6 deletions(-) diff --git a/Source/cmLocalGenerator.cxx b/Source/cmLocalGenerator.cxx index 946a020..1fd8ebb 100644 --- a/Source/cmLocalGenerator.cxx +++ b/Source/cmLocalGenerator.cxx @@ -250,12 +250,6 @@ void cmLocalGenerator::SetGlobalGenerator(cmGlobalGenerator *gg) this->GlobalGenerator = gg; this->Makefile = new cmMakefile; this->Makefile->SetLocalGenerator(this); - - // setup the home directories - this->Makefile->SetHomeDirectory( - gg->GetCMakeInstance()->GetHomeDirectory()); - this->Makefile->SetHomeOutputDirectory( - gg->GetCMakeInstance()->GetHomeOutputDirectory()); } void cmLocalGenerator::ConfigureFinalPass() diff --git a/Source/cmMakefile.cxx b/Source/cmMakefile.cxx index 23c2e48..bc0ac26 100644 --- a/Source/cmMakefile.cxx +++ b/Source/cmMakefile.cxx @@ -696,6 +696,9 @@ void cmMakefile::SetLocalGenerator(cmLocalGenerator* lg) this->Properties.SetCMakeInstance(this->GetCMakeInstance()); this->WarnUnused = this->GetCMakeInstance()->GetWarnUnused(); this->CheckSystemVars = this->GetCMakeInstance()->GetCheckSystemVars(); + this->SetHomeDirectory(this->GetCMakeInstance()->GetHomeDirectory()); + this->SetHomeOutputDirectory( + this->GetCMakeInstance()->GetHomeOutputDirectory()); } namespace -- cgit v0.12 From b23cf06f861e928cf8ee942eabd24ea76e299f4f Mon Sep 17 00:00:00 2001 From: Stephen Kelly Date: Thu, 16 Apr 2015 00:52:20 +0200 Subject: cmake: Remove redundant start directories. They are maintained as containing the same content as the 'home' directories, but they are never read from. Fix some comments and help strings which confused the two by name. They actually mean what is called CMAKE_SOURCE_DIR in cmake code. --- Source/QtDialog/QCMake.cxx | 2 -- Source/cmMakefile.cxx | 2 -- Source/cmake.cxx | 44 ++------------------------------------------ Source/cmake.h | 24 +++--------------------- Source/cmcmd.cxx | 2 -- 5 files changed, 5 insertions(+), 69 deletions(-) diff --git a/Source/QtDialog/QCMake.cxx b/Source/QtDialog/QCMake.cxx index 6524350..9edbb20 100644 --- a/Source/QtDialog/QCMake.cxx +++ b/Source/QtDialog/QCMake.cxx @@ -144,9 +144,7 @@ void QCMake::configure() #endif this->CMakeInstance->SetHomeDirectory(this->SourceDirectory.toLocal8Bit().data()); - this->CMakeInstance->SetStartDirectory(this->SourceDirectory.toLocal8Bit().data()); this->CMakeInstance->SetHomeOutputDirectory(this->BinaryDirectory.toLocal8Bit().data()); - this->CMakeInstance->SetStartOutputDirectory(this->BinaryDirectory.toLocal8Bit().data()); this->CMakeInstance->SetGlobalGenerator( this->CMakeInstance->CreateGlobalGenerator(this->Generator.toLocal8Bit().data())); this->CMakeInstance->SetGeneratorPlatform(""); diff --git a/Source/cmMakefile.cxx b/Source/cmMakefile.cxx index bc0ac26..90a6410 100644 --- a/Source/cmMakefile.cxx +++ b/Source/cmMakefile.cxx @@ -3544,8 +3544,6 @@ int cmMakefile::TryCompile(const std::string& srcdir, // do a configure cm.SetHomeDirectory(srcdir); cm.SetHomeOutputDirectory(bindir); - cm.SetStartDirectory(srcdir); - cm.SetStartOutputDirectory(bindir); cm.SetGeneratorPlatform(this->GetCMakeInstance()->GetGeneratorPlatform()); cm.SetGeneratorToolset(this->GetCMakeInstance()->GetGeneratorToolset()); cm.LoadCache(); diff --git a/Source/cmake.cxx b/Source/cmake.cxx index f0fc4f0..81b8d8d 100644 --- a/Source/cmake.cxx +++ b/Source/cmake.cxx @@ -728,9 +728,6 @@ void cmake::SetArgs(const std::vector& args, this->SetHomeDirectory (cmSystemTools::GetCurrentWorkingDirectory()); } - - this->SetStartDirectory(this->GetHomeDirectory()); - this->SetStartOutputDirectory(this->GetHomeOutputDirectory()); } //---------------------------------------------------------------------------- @@ -801,9 +798,7 @@ void cmake::SetDirectoriesFromFile(const char* arg) if (existingValue) { this->SetHomeOutputDirectory(cachePath); - this->SetStartOutputDirectory(cachePath); this->SetHomeDirectory(existingValue); - this->SetStartDirectory(existingValue); return; } } @@ -813,14 +808,12 @@ void cmake::SetDirectoriesFromFile(const char* arg) if(!listPath.empty()) { this->SetHomeDirectory(listPath); - this->SetStartDirectory(listPath); if(argIsFile) { // Source CMakeLists.txt file given. It was probably dropped // onto the executable in a GUI. Default to an in-source build. this->SetHomeOutputDirectory(listPath); - this->SetStartOutputDirectory(listPath); } else { @@ -828,7 +821,6 @@ void cmake::SetDirectoriesFromFile(const char* arg) // directory as build tree. std::string cwd = cmSystemTools::GetCurrentWorkingDirectory(); this->SetHomeOutputDirectory(cwd); - this->SetStartOutputDirectory(cwd); } return; } @@ -839,9 +831,7 @@ void cmake::SetDirectoriesFromFile(const char* arg) std::string full = cmSystemTools::CollapseFullPath(arg); std::string cwd = cmSystemTools::GetCurrentWorkingDirectory(); this->SetHomeDirectory(full); - this->SetStartDirectory(full); this->SetHomeOutputDirectory(cwd); - this->SetStartOutputDirectory(cwd); } // at the end of this CMAKE_ROOT and CMAKE_COMMAND should be added to the @@ -1006,28 +996,6 @@ const char* cmake::GetHomeOutputDirectory() const return this->HomeOutputDirectory.c_str(); } -const char* cmake::GetStartDirectory() const -{ - return this->cmStartDirectory.c_str(); -} - -void cmake::SetStartDirectory(const std::string& dir) -{ - this->cmStartDirectory = dir; - cmSystemTools::ConvertToUnixSlashes(this->cmStartDirectory); -} - -const char* cmake::GetStartOutputDirectory() const -{ - return this->StartOutputDirectory.c_str(); -} - -void cmake::SetStartOutputDirectory(const std::string& dir) -{ - this->StartOutputDirectory = dir; - cmSystemTools::ConvertToUnixSlashes(this->StartOutputDirectory); -} - void cmake::SetGlobalGenerator(cmGlobalGenerator *gg) { if(!gg) @@ -1088,7 +1056,7 @@ void cmake::SetGlobalGenerator(cmGlobalGenerator *gg) int cmake::DoPreConfigureChecks() { - // Make sure the Start directory contains a CMakeLists.txt file. + // Make sure the Source directory contains a CMakeLists.txt file. std::string srcList = this->GetHomeDirectory(); srcList += "/CMakeLists.txt"; if(!cmSystemTools::FileExists(srcList.c_str())) @@ -1262,7 +1230,7 @@ int cmake::ActualConfigure() this->CacheManager->AddCacheEntry ("CMAKE_HOME_DIRECTORY", this->GetHomeDirectory(), - "Start directory with the top level CMakeLists.txt file for this " + "Source directory with the top level CMakeLists.txt file for this " "project", cmState::INTERNAL); } @@ -1632,12 +1600,6 @@ int cmake::Run(const std::vector& args, bool noconfigure) return 0; } - // If we are doing global generate, we better set start and start - // output directory to the root of the project. - std::string oldstartdir = this->GetStartDirectory(); - std::string oldstartoutputdir = this->GetStartOutputDirectory(); - this->SetStartDirectory(this->GetHomeDirectory()); - this->SetStartOutputDirectory(this->GetHomeOutputDirectory()); int ret = this->Configure(); if (ret || this->GetWorkingMode() != NORMAL_MODE) { @@ -1667,8 +1629,6 @@ int cmake::Run(const std::vector& args, bool noconfigure) { return ret; } - this->SetStartDirectory(oldstartdir); - this->SetStartOutputDirectory(oldstartoutputdir); return ret; } diff --git a/Source/cmake.h b/Source/cmake.h index 352850d..9dd7c31 100644 --- a/Source/cmake.h +++ b/Source/cmake.h @@ -41,7 +41,7 @@ class cmState; * The basic process for a GUI is as follows: * * -# Create a cmake instance - * -# Set the Home & Start directories, generator, and cmake command. this + * -# Set the Home directories, generator, and cmake command. this * can be done using the Set methods or by using SetArgs and passing in * command line arguments. * -# Load the cache by calling LoadCache (duh) @@ -52,7 +52,7 @@ class cmState; * -# Let the user change values and go back to step 5 * -# call Generate - * If your GUI allows the user to change the start & home directories then + * If your GUI allows the user to change the home directories then * you must at a minimum redo steps 2 through 7. */ @@ -106,9 +106,7 @@ class cmake /** * Set/Get the home directory (or output directory) in the project. The * home directory is the top directory of the project. It is the - * path-to-source cmake was run with. Remember that CMake processes - * CMakeLists files by recursing up the tree starting at the StartDirectory - * and going up until it reaches the HomeDirectory. + * path-to-source cmake was run with. */ void SetHomeDirectory(const std::string& dir); const char* GetHomeDirectory() const; @@ -116,20 +114,6 @@ class cmake const char* GetHomeOutputDirectory() const; //@} - //@{ - /** - * Set/Get the start directory (or output directory). The start directory - * is the directory of the CMakeLists.txt file that started the current - * round of processing. Remember that CMake processes CMakeLists files by - * recursing up the tree starting at the StartDirectory and going up until - * it reaches the HomeDirectory. - */ - void SetStartDirectory(const std::string& dir); - const char* GetStartDirectory() const; - void SetStartOutputDirectory(const std::string& dir); - const char* GetStartOutputDirectory() const; - //@} - /** * Handle a command line invocation of cmake. */ @@ -354,8 +338,6 @@ protected: cmCacheManager *CacheManager; std::string cmHomeDirectory; std::string HomeOutputDirectory; - std::string cmStartDirectory; - std::string StartOutputDirectory; bool SuppressDevWarnings; bool DoSuppressDevWarnings; std::string GeneratorPlatform; diff --git a/Source/cmcmd.cxx b/Source/cmcmd.cxx index db85b59..a279ec7 100644 --- a/Source/cmcmd.cxx +++ b/Source/cmcmd.cxx @@ -642,9 +642,7 @@ int cmcmd::ExecuteCMakeCommand(std::vector& args) homeOutDir = cmSystemTools::CollapseFullPath(homeOutDir); startOutDir = cmSystemTools::CollapseFullPath(startOutDir); cm.SetHomeDirectory(homeDir); - cm.SetStartDirectory(startDir); cm.SetHomeOutputDirectory(homeOutDir); - cm.SetStartOutputDirectory(startOutDir); if(cmGlobalGenerator* ggd = cm.CreateGlobalGenerator(gen)) { cm.SetGlobalGenerator(ggd); -- cgit v0.12 From 55d80d0a8557189400bc12c5e577702a4d03b2e6 Mon Sep 17 00:00:00 2001 From: Stephen Kelly Date: Thu, 16 Apr 2015 21:17:41 +0200 Subject: cmMakefile: Rename GetCurrent{,Source}Directory. Match the names used in cmake code. --- Source/CTest/cmCTestScriptHandler.cxx | 2 +- Source/cmAddSubDirectoryCommand.cxx | 8 ++++---- Source/cmAuxSourceDirectoryCommand.cxx | 2 +- Source/cmCPluginAPI.cxx | 2 +- Source/cmConfigureFileCommand.cxx | 2 +- Source/cmExtraQbsGenerator.cxx | 2 +- Source/cmFLTKWrapUICommand.cxx | 2 +- Source/cmFileCommand.cxx | 20 ++++++++++---------- Source/cmFindPackageCommand.cxx | 2 +- Source/cmGetFilenameComponentCommand.cxx | 2 +- Source/cmGetPropertyCommand.cxx | 2 +- Source/cmGlobalGenerator.cxx | 5 +++-- Source/cmGlobalXCodeGenerator.cxx | 4 ++-- Source/cmInstallCommand.cxx | 6 +++--- Source/cmInstallFilesCommand.cxx | 4 ++-- Source/cmInstallProgramsCommand.cxx | 4 ++-- Source/cmLocalGenerator.cxx | 5 +++-- Source/cmMakefile.cxx | 12 ++++++------ Source/cmMakefile.h | 2 +- Source/cmProjectCommand.cxx | 4 ++-- Source/cmQTWrapCPPCommand.cxx | 2 +- Source/cmQTWrapUICommand.cxx | 2 +- Source/cmSearchPath.cxx | 8 +++++--- Source/cmSetPropertyCommand.cxx | 2 +- Source/cmSourceFile.cxx | 2 +- Source/cmSourceFileLocation.cxx | 8 ++++---- Source/cmSourceGroupCommand.cxx | 2 +- Source/cmSubdirCommand.cxx | 2 +- Source/cmUtilitySourceCommand.cxx | 2 +- Source/cmVisualStudio10TargetGenerator.cxx | 2 +- Source/cmakemain.cxx | 2 +- 31 files changed, 65 insertions(+), 61 deletions(-) diff --git a/Source/CTest/cmCTestScriptHandler.cxx b/Source/CTest/cmCTestScriptHandler.cxx index 7f9825c..31c0171 100644 --- a/Source/CTest/cmCTestScriptHandler.cxx +++ b/Source/CTest/cmCTestScriptHandler.cxx @@ -346,7 +346,7 @@ void cmCTestScriptHandler::CreateCMake() this->CMake->SetProgressCallback(ctestScriptProgressCallback, this->CTest); // Set CMAKE_CURRENT_SOURCE_DIR and CMAKE_CURRENT_BINARY_DIR. - // Also, some commands need Makefile->GetCurrentDirectory(). + // Also, some commands need Makefile->GetCurrentSourceDirectory(). std::string cwd = cmSystemTools::GetCurrentWorkingDirectory(); this->Makefile->SetStartDirectory(cwd); this->Makefile->SetStartOutputDirectory(cwd); diff --git a/Source/cmAddSubDirectoryCommand.cxx b/Source/cmAddSubDirectoryCommand.cxx index 9d55c1a..bae76d2 100644 --- a/Source/cmAddSubDirectoryCommand.cxx +++ b/Source/cmAddSubDirectoryCommand.cxx @@ -57,7 +57,7 @@ bool cmAddSubDirectoryCommand::InitialPass } else { - srcPath = this->Makefile->GetCurrentDirectory(); + srcPath = this->Makefile->GetCurrentSourceDirectory(); srcPath += "/"; srcPath += srcArg; } @@ -79,12 +79,12 @@ bool cmAddSubDirectoryCommand::InitialPass // not a subdirectory of the current directory then it is an // error. if(!cmSystemTools::IsSubDirectory(srcPath, - this->Makefile->GetCurrentDirectory())) + this->Makefile->GetCurrentSourceDirectory())) { std::ostringstream e; e << "not given a binary directory but the given source directory " << "\"" << srcPath << "\" is not a subdirectory of \"" - << this->Makefile->GetCurrentDirectory() << "\". " + << this->Makefile->GetCurrentSourceDirectory() << "\". " << "When specifying an out-of-tree source a binary directory " << "must be explicitly specified."; this->SetError(e.str()); @@ -93,7 +93,7 @@ bool cmAddSubDirectoryCommand::InitialPass // Remove the CurrentDirectory from the srcPath and replace it // with the CurrentOutputDirectory. - const char* src = this->Makefile->GetCurrentDirectory(); + const char* src = this->Makefile->GetCurrentSourceDirectory(); const char* bin = this->Makefile->GetCurrentOutputDirectory(); size_t srcLen = strlen(src); size_t binLen = strlen(bin); diff --git a/Source/cmAuxSourceDirectoryCommand.cxx b/Source/cmAuxSourceDirectoryCommand.cxx index b8238f8..5f5017d 100644 --- a/Source/cmAuxSourceDirectoryCommand.cxx +++ b/Source/cmAuxSourceDirectoryCommand.cxx @@ -29,7 +29,7 @@ bool cmAuxSourceDirectoryCommand::InitialPass std::string tdir; if(!cmSystemTools::FileIsFullPath(templateDirectory.c_str())) { - tdir = this->Makefile->GetCurrentDirectory(); + tdir = this->Makefile->GetCurrentSourceDirectory(); tdir += "/"; tdir += templateDirectory; } diff --git a/Source/cmCPluginAPI.cxx b/Source/cmCPluginAPI.cxx index 77cd6c6..d0d30b2 100644 --- a/Source/cmCPluginAPI.cxx +++ b/Source/cmCPluginAPI.cxx @@ -141,7 +141,7 @@ const char* CCONV cmGetStartOutputDirectory(void *arg) const char* CCONV cmGetCurrentDirectory(void *arg) { cmMakefile *mf = static_cast(arg); - return mf->GetCurrentDirectory(); + return mf->GetCurrentSourceDirectory(); } const char* CCONV cmGetCurrentOutputDirectory(void *arg) { diff --git a/Source/cmConfigureFileCommand.cxx b/Source/cmConfigureFileCommand.cxx index 6876388..967d54d 100644 --- a/Source/cmConfigureFileCommand.cxx +++ b/Source/cmConfigureFileCommand.cxx @@ -26,7 +26,7 @@ bool cmConfigureFileCommand const char* inFile = args[0].c_str(); if(!cmSystemTools::FileIsFullPath(inFile)) { - this->InputFile = this->Makefile->GetCurrentDirectory(); + this->InputFile = this->Makefile->GetCurrentSourceDirectory(); this->InputFile += "/"; } this->InputFile += inFile; diff --git a/Source/cmExtraQbsGenerator.cxx b/Source/cmExtraQbsGenerator.cxx index 5a1f9ef..7e923a8 100644 --- a/Source/cmExtraQbsGenerator.cxx +++ b/Source/cmExtraQbsGenerator.cxx @@ -81,7 +81,7 @@ void cmExtraQbsGenerator::AppendSubProject(cmGeneratedFileStream &fout, } const std::string &relativePath = cmSystemTools::RelativePath( - mk->GetHomeDirectory(), mk->GetCurrentDirectory()); + mk->GetHomeDirectory(), mk->GetCurrentSourceDirectory()); fout << "\tProject {\n" << "\t\tname:\"" << relativePath << "\"\n"; this->AppendProduct(fout, lg); diff --git a/Source/cmFLTKWrapUICommand.cxx b/Source/cmFLTKWrapUICommand.cxx index 488beaa..5000fd2 100644 --- a/Source/cmFLTKWrapUICommand.cxx +++ b/Source/cmFLTKWrapUICommand.cxx @@ -24,7 +24,7 @@ bool cmFLTKWrapUICommand } // what is the current source dir - std::string cdir = this->Makefile->GetCurrentDirectory(); + std::string cdir = this->Makefile->GetCurrentSourceDirectory(); const char* fluid_exe = this->Makefile->GetRequiredDefinition("FLTK_FLUID_EXECUTABLE"); diff --git a/Source/cmFileCommand.cxx b/Source/cmFileCommand.cxx index 6ac0def..a0ba885 100644 --- a/Source/cmFileCommand.cxx +++ b/Source/cmFileCommand.cxx @@ -227,7 +227,7 @@ bool cmFileCommand::HandleWriteCommand(std::vector const& args, std::string fileName = *i; if ( !cmsys::SystemTools::FileIsFullPath(i->c_str()) ) { - fileName = this->Makefile->GetCurrentDirectory(); + fileName = this->Makefile->GetCurrentSourceDirectory(); fileName += "/" + *i; } @@ -309,7 +309,7 @@ bool cmFileCommand::HandleReadCommand(std::vector const& args) std::string fileName = fileNameArg.GetString(); if ( !cmsys::SystemTools::FileIsFullPath(fileName.c_str()) ) { - fileName = this->Makefile->GetCurrentDirectory(); + fileName = this->Makefile->GetCurrentSourceDirectory(); fileName += "/" + fileNameArg.GetString(); } @@ -445,7 +445,7 @@ bool cmFileCommand::HandleStringsCommand(std::vector const& args) std::string fileName = args[1]; if(!cmsys::SystemTools::FileIsFullPath(fileName.c_str())) { - fileName = this->Makefile->GetCurrentDirectory(); + fileName = this->Makefile->GetCurrentSourceDirectory(); fileName += "/" + args[1]; } @@ -984,7 +984,7 @@ bool cmFileCommand::HandleGlobCommand(std::vector const& args, cmsys::Glob::GlobMessages globMessages; if ( !cmsys::SystemTools::FileIsFullPath(i->c_str()) ) { - std::string expr = this->Makefile->GetCurrentDirectory(); + std::string expr = this->Makefile->GetCurrentSourceDirectory(); // Handle script mode if (!expr.empty()) { @@ -1091,7 +1091,7 @@ bool cmFileCommand::HandleMakeDirectoryCommand( const std::string* cdir = &(*i); if ( !cmsys::SystemTools::FileIsFullPath(i->c_str()) ) { - expr = this->Makefile->GetCurrentDirectory(); + expr = this->Makefile->GetCurrentSourceDirectory(); expr += "/" + *i; cdir = &expr; } @@ -1556,7 +1556,7 @@ bool cmFileCopier::CheckValue(std::string const& arg) } else { - std::string file = this->Makefile->GetCurrentDirectory(); + std::string file = this->Makefile->GetCurrentSourceDirectory(); file += "/" + arg; this->Files.push_back(file); } @@ -2658,13 +2658,13 @@ bool cmFileCommand::HandleRename(std::vector const& args) std::string oldname = args[1]; if(!cmsys::SystemTools::FileIsFullPath(oldname.c_str())) { - oldname = this->Makefile->GetCurrentDirectory(); + oldname = this->Makefile->GetCurrentSourceDirectory(); oldname += "/" + args[1]; } std::string newname = args[2]; if(!cmsys::SystemTools::FileIsFullPath(newname.c_str())) { - newname = this->Makefile->GetCurrentDirectory(); + newname = this->Makefile->GetCurrentSourceDirectory(); newname += "/" + args[2]; } @@ -2698,7 +2698,7 @@ bool cmFileCommand::HandleRemove(std::vector const& args, std::string fileName = *i; if(!cmsys::SystemTools::FileIsFullPath(fileName.c_str())) { - fileName = this->Makefile->GetCurrentDirectory(); + fileName = this->Makefile->GetCurrentSourceDirectory(); fileName += "/" + *i; } @@ -3743,7 +3743,7 @@ bool cmFileCommand::HandleLockCommand( if (!cmsys::SystemTools::FileIsFullPath(path)) { - path = this->Makefile->GetCurrentDirectory() + ("/" + path); + path = this->Makefile->GetCurrentSourceDirectory() + ("/" + path); } // Unify path (remove '//', '/../', ...) diff --git a/Source/cmFindPackageCommand.cxx b/Source/cmFindPackageCommand.cxx index aecd230..4d568e9 100644 --- a/Source/cmFindPackageCommand.cxx +++ b/Source/cmFindPackageCommand.cxx @@ -663,7 +663,7 @@ bool cmFindPackageCommand::HandlePackageMode() if(!cmSystemTools::FileIsFullPath(dir.c_str())) { dir = "/" + dir; - dir = this->Makefile->GetCurrentDirectory() + dir; + dir = this->Makefile->GetCurrentSourceDirectory() + dir; } // The file location was cached. Look for the correct file. std::string file; diff --git a/Source/cmGetFilenameComponentCommand.cxx b/Source/cmGetFilenameComponentCommand.cxx index 6947a7f..67f9f2d 100644 --- a/Source/cmGetFilenameComponentCommand.cxx +++ b/Source/cmGetFilenameComponentCommand.cxx @@ -97,7 +97,7 @@ bool cmGetFilenameComponentCommand // If the path given is relative evaluate it relative to the // current source directory. result = cmSystemTools::CollapseFullPath( - filename, this->Makefile->GetCurrentDirectory()); + filename, this->Makefile->GetCurrentSourceDirectory()); if(args[2] == "REALPATH") { // Resolve symlinks if possible diff --git a/Source/cmGetPropertyCommand.cxx b/Source/cmGetPropertyCommand.cxx index 3e1d08e..00dbdd3 100644 --- a/Source/cmGetPropertyCommand.cxx +++ b/Source/cmGetPropertyCommand.cxx @@ -255,7 +255,7 @@ bool cmGetPropertyCommand::HandleDirectoryMode() std::string dir = this->Name; if(!cmSystemTools::FileIsFullPath(dir.c_str())) { - dir = this->Makefile->GetCurrentDirectory(); + dir = this->Makefile->GetCurrentSourceDirectory(); dir += "/"; dir += this->Name; } diff --git a/Source/cmGlobalGenerator.cxx b/Source/cmGlobalGenerator.cxx index 786f8fa..c76c65d 100644 --- a/Source/cmGlobalGenerator.cxx +++ b/Source/cmGlobalGenerator.cxx @@ -1567,7 +1567,8 @@ void cmGlobalGenerator::CheckLocalGenerators() text += "\n linked by target \""; text += l->second.GetName(); text += "\" in directory "; - text+=this->LocalGenerators[i]->GetMakefile()->GetCurrentDirectory(); + text+=this->LocalGenerators[i]->GetMakefile() + ->GetCurrentSourceDirectory(); notFoundMap[varName] = text; } } @@ -1597,7 +1598,7 @@ void cmGlobalGenerator::CheckLocalGenerators() std::string text = notFoundMap[varName]; text += "\n used as include directory in directory "; text += this->LocalGenerators[i] - ->GetMakefile()->GetCurrentDirectory(); + ->GetMakefile()->GetCurrentSourceDirectory(); notFoundMap[varName] = text; } } diff --git a/Source/cmGlobalXCodeGenerator.cxx b/Source/cmGlobalXCodeGenerator.cxx index 8c37338..c8e7632 100644 --- a/Source/cmGlobalXCodeGenerator.cxx +++ b/Source/cmGlobalXCodeGenerator.cxx @@ -407,7 +407,7 @@ void cmGlobalXCodeGenerator::SetGenerationRoot(cmLocalGenerator* root) { this->CurrentProject = root->GetMakefile()->GetProjectName(); this->SetCurrentLocalGenerator(root); - cmSystemTools::SplitPath(this->CurrentMakefile->GetCurrentDirectory(), + cmSystemTools::SplitPath(this->CurrentMakefile->GetCurrentSourceDirectory(), this->ProjectSourceDirectoryComponents); cmSystemTools::SplitPath(this->CurrentMakefile->GetCurrentOutputDirectory(), this->ProjectOutputDirectoryComponents); @@ -3342,7 +3342,7 @@ bool cmGlobalXCodeGenerator // Point Xcode at the top of the source tree. { std::string pdir = - this->RelativeToBinary(root->GetMakefile()->GetCurrentDirectory()); + this->RelativeToBinary(root->GetMakefile()->GetCurrentSourceDirectory()); this->RootObject->AddAttribute("projectDirPath", this->CreateString(pdir.c_str())); this->RootObject->AddAttribute("projectRoot", this->CreateString("")); diff --git a/Source/cmInstallCommand.cxx b/Source/cmInstallCommand.cxx index 2d7d7cc..fac9641 100644 --- a/Source/cmInstallCommand.cxx +++ b/Source/cmInstallCommand.cxx @@ -163,7 +163,7 @@ bool cmInstallCommand::HandleScriptMode(std::vector const& args) std::string script = args[i]; if(!cmSystemTools::FileIsFullPath(script.c_str())) { - script = this->Makefile->GetCurrentDirectory(); + script = this->Makefile->GetCurrentSourceDirectory(); script += "/"; script += args[i]; } @@ -1093,7 +1093,7 @@ cmInstallCommand::HandleDirectoryMode(std::vector const& args) std::string dir = args[i]; if(!cmSystemTools::FileIsFullPath(dir.c_str())) { - dir = this->Makefile->GetCurrentDirectory(); + dir = this->Makefile->GetCurrentSourceDirectory(); dir += "/"; dir += args[i]; } @@ -1376,7 +1376,7 @@ bool cmInstallCommand::MakeFilesFullPath(const char* modeName, std::string::size_type gpos = cmGeneratorExpression::Find(file); if(gpos != 0 && !cmSystemTools::FileIsFullPath(file.c_str())) { - file = this->Makefile->GetCurrentDirectory(); + file = this->Makefile->GetCurrentSourceDirectory(); file += "/"; file += *fileIt; } diff --git a/Source/cmInstallFilesCommand.cxx b/Source/cmInstallFilesCommand.cxx index 85e5345..64556d0 100644 --- a/Source/cmInstallFilesCommand.cxx +++ b/Source/cmInstallFilesCommand.cxx @@ -95,7 +95,7 @@ void cmInstallFilesCommand::FinalPass() { std::vector files; std::string regex = this->FinalArgs[0]; - cmSystemTools::Glob(this->Makefile->GetCurrentDirectory(), + cmSystemTools::Glob(this->Makefile->GetCurrentSourceDirectory(), regex, files); std::vector::iterator s = files.begin(); @@ -155,7 +155,7 @@ std::string cmInstallFilesCommand::FindInstallSource(const char* name) const std::string tb = this->Makefile->GetCurrentOutputDirectory(); tb += "/"; tb += name; - std::string ts = this->Makefile->GetCurrentDirectory(); + std::string ts = this->Makefile->GetCurrentSourceDirectory(); ts += "/"; ts += name; diff --git a/Source/cmInstallProgramsCommand.cxx b/Source/cmInstallProgramsCommand.cxx index cc223ab..db1ee79 100644 --- a/Source/cmInstallProgramsCommand.cxx +++ b/Source/cmInstallProgramsCommand.cxx @@ -63,7 +63,7 @@ void cmInstallProgramsCommand::FinalPass() else // reg exp list { std::vector programs; - cmSystemTools::Glob(this->Makefile->GetCurrentDirectory(), + cmSystemTools::Glob(this->Makefile->GetCurrentSourceDirectory(), this->FinalArgs[0], programs); std::vector::iterator s = programs.begin(); @@ -118,7 +118,7 @@ std::string cmInstallProgramsCommand std::string tb = this->Makefile->GetCurrentOutputDirectory(); tb += "/"; tb += name; - std::string ts = this->Makefile->GetCurrentDirectory(); + std::string ts = this->Makefile->GetCurrentSourceDirectory(); ts += "/"; ts += name; diff --git a/Source/cmLocalGenerator.cxx b/Source/cmLocalGenerator.cxx index 1fd8ebb..5e47b91 100644 --- a/Source/cmLocalGenerator.cxx +++ b/Source/cmLocalGenerator.cxx @@ -438,7 +438,8 @@ void cmLocalGenerator::GenerateInstallRules() // Write the header. fout << "# Install script for directory: " - << this->Makefile->GetCurrentDirectory() << std::endl << std::endl; + << this->Makefile->GetCurrentSourceDirectory() + << std::endl << std::endl; fout << "# Set the install prefix" << std::endl << "if(NOT DEFINED CMAKE_INSTALL_PREFIX)" << std::endl << " set(CMAKE_INSTALL_PREFIX \"" << prefix << "\")" << std::endl @@ -2159,7 +2160,7 @@ bool cmLocalGenerator::GetRealDependency(const std::string& inName, // Treat the name as relative to the source directory in which it // was given. - dep = this->Makefile->GetCurrentDirectory(); + dep = this->Makefile->GetCurrentSourceDirectory(); dep += "/"; dep += inName; return true; diff --git a/Source/cmMakefile.cxx b/Source/cmMakefile.cxx index 90a6410..251e840 100644 --- a/Source/cmMakefile.cxx +++ b/Source/cmMakefile.cxx @@ -269,7 +269,7 @@ void cmMakefile::IssueMessage(cmake::MessageType t, if(this->ListFileStack.empty()) { // We are not processing the project. Add the directory-level context. - lfc.FilePath = this->GetCurrentDirectory(); + lfc.FilePath = this->GetCurrentSourceDirectory(); lfc.FilePath += "/CMakeLists.txt"; } else @@ -1622,7 +1622,7 @@ void cmMakefile::ConfigureSubDirectory(cmLocalGenerator *lg2) if (this->GetCMakeInstance()->GetDebugOutput()) { std::string msg=" Entering "; - msg += lg2->GetMakefile()->GetCurrentDirectory(); + msg += lg2->GetMakefile()->GetCurrentSourceDirectory(); cmSystemTools::Message(msg.c_str()); } // finally configure the subdir @@ -1630,7 +1630,7 @@ void cmMakefile::ConfigureSubDirectory(cmLocalGenerator *lg2) if (this->GetCMakeInstance()->GetDebugOutput()) { std::string msg=" Returning to "; - msg += this->GetCurrentDirectory(); + msg += this->GetCurrentSourceDirectory(); cmSystemTools::Message(msg.c_str()); } } @@ -4039,7 +4039,7 @@ void cmMakefile::SetProperty(const std::string& prop, const char* value) if ( prop == "ADDITIONAL_MAKE_CLEAN_FILES" ) { // This property is not inherrited - if ( strcmp(this->GetCurrentDirectory(), + if ( strcmp(this->GetCurrentSourceDirectory(), this->GetStartDirectory()) != 0 ) { return; @@ -4307,7 +4307,7 @@ void cmMakefile::AddCMakeDependFilesFromUser() } else { - std::string f = this->GetCurrentDirectory(); + std::string f = this->GetCurrentSourceDirectory(); f += "/"; f += *i; this->AddCMakeDependFile(f); @@ -4588,7 +4588,7 @@ bool cmMakefile::EnforceUniqueName(std::string const& name, std::string& msg, default: break; } e << "created in source directory \"" - << existing->GetMakefile()->GetCurrentDirectory() << "\". " + << existing->GetMakefile()->GetCurrentSourceDirectory() << "\". " << "See documentation for policy CMP0002 for more details."; msg = e.str(); return false; diff --git a/Source/cmMakefile.h b/Source/cmMakefile.h index 356e4c2..8aec647 100644 --- a/Source/cmMakefile.h +++ b/Source/cmMakefile.h @@ -484,7 +484,7 @@ public: } //@} - const char* GetCurrentDirectory() const + const char* GetCurrentSourceDirectory() const { return this->cmStartDirectory.c_str(); } diff --git a/Source/cmProjectCommand.cxx b/Source/cmProjectCommand.cxx index 43b02bc..af62b0b 100644 --- a/Source/cmProjectCommand.cxx +++ b/Source/cmProjectCommand.cxx @@ -33,7 +33,7 @@ bool cmProjectCommand "Value Computed by CMake", cmState::STATIC); this->Makefile->AddCacheDefinition (srcdir, - this->Makefile->GetCurrentDirectory(), + this->Makefile->GetCurrentSourceDirectory(), "Value Computed by CMake", cmState::STATIC); bindir = "PROJECT_BINARY_DIR"; @@ -42,7 +42,7 @@ bool cmProjectCommand this->Makefile->AddDefinition(bindir, this->Makefile->GetCurrentOutputDirectory()); this->Makefile->AddDefinition(srcdir, - this->Makefile->GetCurrentDirectory()); + this->Makefile->GetCurrentSourceDirectory()); this->Makefile->AddDefinition("PROJECT_NAME", args[0].c_str()); diff --git a/Source/cmQTWrapCPPCommand.cxx b/Source/cmQTWrapCPPCommand.cxx index 878562c..655bf82 100644 --- a/Source/cmQTWrapCPPCommand.cxx +++ b/Source/cmQTWrapCPPCommand.cxx @@ -66,7 +66,7 @@ bool cmQTWrapCPPCommand::InitialPass(std::vector const& args, } else { - hname = this->Makefile->GetCurrentDirectory(); + hname = this->Makefile->GetCurrentSourceDirectory(); } hname += "/"; hname += *j; diff --git a/Source/cmQTWrapUICommand.cxx b/Source/cmQTWrapUICommand.cxx index 9b92b1e..b1e43b8 100644 --- a/Source/cmQTWrapUICommand.cxx +++ b/Source/cmQTWrapUICommand.cxx @@ -73,7 +73,7 @@ bool cmQTWrapUICommand::InitialPass(std::vector const& args, } else { - uiName = this->Makefile->GetCurrentDirectory(); + uiName = this->Makefile->GetCurrentSourceDirectory(); } uiName += "/"; uiName += *j; diff --git a/Source/cmSearchPath.cxx b/Source/cmSearchPath.cxx index 045c82e..c9cc817 100644 --- a/Source/cmSearchPath.cxx +++ b/Source/cmSearchPath.cxx @@ -86,7 +86,7 @@ void cmSearchPath::AddUserPath(const std::string& path) for(std::vector::const_iterator p = outPaths.begin(); p != outPaths.end(); ++p) { - this->AddPathInternal(*p, this->FC->Makefile->GetCurrentDirectory()); + this->AddPathInternal(*p, this->FC->Makefile->GetCurrentSourceDirectory()); } } @@ -104,7 +104,8 @@ void cmSearchPath::AddCMakePath(const std::string& variable) for(std::vector::const_iterator p = expanded.begin(); p!= expanded.end(); ++p) { - this->AddPathInternal(*p, this->FC->Makefile->GetCurrentDirectory()); + this->AddPathInternal(*p, + this->FC->Makefile->GetCurrentSourceDirectory()); } } } @@ -132,7 +133,8 @@ void cmSearchPath::AddCMakePrefixPath(const std::string& variable) std::vector expanded; cmSystemTools::ExpandListArgument(value, expanded); - this->AddPrefixPaths(expanded, this->FC->Makefile->GetCurrentDirectory()); + this->AddPrefixPaths(expanded, + this->FC->Makefile->GetCurrentSourceDirectory()); } } diff --git a/Source/cmSetPropertyCommand.cxx b/Source/cmSetPropertyCommand.cxx index bb94a72..35262b6 100644 --- a/Source/cmSetPropertyCommand.cxx +++ b/Source/cmSetPropertyCommand.cxx @@ -197,7 +197,7 @@ bool cmSetPropertyCommand::HandleDirectoryMode() std::string dir = *this->Names.begin(); if(!cmSystemTools::FileIsFullPath(dir.c_str())) { - dir = this->Makefile->GetCurrentDirectory(); + dir = this->Makefile->GetCurrentSourceDirectory(); dir += "/"; dir += *this->Names.begin(); } diff --git a/Source/cmSourceFile.cxx b/Source/cmSourceFile.cxx index 6847475..c28d7b4 100644 --- a/Source/cmSourceFile.cxx +++ b/Source/cmSourceFile.cxx @@ -162,7 +162,7 @@ bool cmSourceFile::FindFullPath(std::string* error) const char* tryDirs[3] = {0, 0, 0}; if(this->Location.DirectoryIsAmbiguous()) { - tryDirs[0] = mf->GetCurrentDirectory(); + tryDirs[0] = mf->GetCurrentSourceDirectory(); tryDirs[1] = mf->GetCurrentOutputDirectory(); } else diff --git a/Source/cmSourceFileLocation.cxx b/Source/cmSourceFileLocation.cxx index 9d67c1e..d88a5f2 100644 --- a/Source/cmSourceFileLocation.cxx +++ b/Source/cmSourceFileLocation.cxx @@ -93,7 +93,7 @@ void cmSourceFileLocation::DirectoryUseSource() { this->Directory = cmSystemTools::CollapseFullPath( - this->Directory, this->Makefile->GetCurrentDirectory()); + this->Directory, this->Makefile->GetCurrentSourceDirectory()); this->AmbiguousDirectory = false; } } @@ -143,7 +143,7 @@ void cmSourceFileLocation::UpdateExtension(const std::string& name) // Check the source tree only because a file in the build tree should // be specified by full path at least once. We do not want this // detection to depend on whether the project has already been built. - tryPath = this->Makefile->GetCurrentDirectory(); + tryPath = this->Makefile->GetCurrentSourceDirectory(); tryPath += "/"; } if(!this->Directory.empty()) @@ -282,7 +282,7 @@ bool cmSourceFileLocation::Matches(cmSourceFileLocation const& loc) // Compare possible directory combinations. std::string const& srcDir = cmSystemTools::CollapseFullPath( - this->Directory, this->Makefile->GetCurrentDirectory()); + this->Directory, this->Makefile->GetCurrentSourceDirectory()); std::string const& binDir = cmSystemTools::CollapseFullPath( this->Directory, this->Makefile->GetCurrentOutputDirectory()); @@ -297,7 +297,7 @@ bool cmSourceFileLocation::Matches(cmSourceFileLocation const& loc) // Compare possible directory combinations. std::string const& srcDir = cmSystemTools::CollapseFullPath( - loc.Directory, loc.Makefile->GetCurrentDirectory()); + loc.Directory, loc.Makefile->GetCurrentSourceDirectory()); std::string const& binDir = cmSystemTools::CollapseFullPath( loc.Directory, loc.Makefile->GetCurrentOutputDirectory()); diff --git a/Source/cmSourceGroupCommand.cxx b/Source/cmSourceGroupCommand.cxx index 1741e05..fadb172 100644 --- a/Source/cmSourceGroupCommand.cxx +++ b/Source/cmSourceGroupCommand.cxx @@ -81,7 +81,7 @@ bool cmSourceGroupCommand std::string src = args[i]; if(!cmSystemTools::FileIsFullPath(src.c_str())) { - src = this->Makefile->GetCurrentDirectory(); + src = this->Makefile->GetCurrentSourceDirectory(); src += "/"; src += args[i]; } diff --git a/Source/cmSubdirCommand.cxx b/Source/cmSubdirCommand.cxx index 7cb2edc..47198a3 100644 --- a/Source/cmSubdirCommand.cxx +++ b/Source/cmSubdirCommand.cxx @@ -39,7 +39,7 @@ bool cmSubdirCommand // if they specified a relative path then compute the full std::string srcPath = - std::string(this->Makefile->GetCurrentDirectory()) + + std::string(this->Makefile->GetCurrentSourceDirectory()) + "/" + i->c_str(); if (cmSystemTools::FileIsDirectory(srcPath)) { diff --git a/Source/cmUtilitySourceCommand.cxx b/Source/cmUtilitySourceCommand.cxx index 10122e9..6f2f950 100644 --- a/Source/cmUtilitySourceCommand.cxx +++ b/Source/cmUtilitySourceCommand.cxx @@ -75,7 +75,7 @@ bool cmUtilitySourceCommand // The third argument specifies the relative directory of the source // of the utility. std::string relativeSource = *arg++; - std::string utilitySource = this->Makefile->GetCurrentDirectory(); + std::string utilitySource = this->Makefile->GetCurrentSourceDirectory(); utilitySource = utilitySource+"/"+relativeSource; // If the directory doesn't exist, the source has not been included. diff --git a/Source/cmVisualStudio10TargetGenerator.cxx b/Source/cmVisualStudio10TargetGenerator.cxx index dad6f93..838d390 100644 --- a/Source/cmVisualStudio10TargetGenerator.cxx +++ b/Source/cmVisualStudio10TargetGenerator.cxx @@ -2194,7 +2194,7 @@ void cmVisualStudio10TargetGenerator::WriteAntBuildOptions( { // Look through the sources for AndroidManifest.xml and use // its location as the root source directory. - std::string rootDir = this->Makefile->GetCurrentDirectory(); + std::string rootDir = this->Makefile->GetCurrentSourceDirectory(); { std::vector extraSources; this->GeneratorTarget->GetExtraSources(extraSources, ""); diff --git a/Source/cmakemain.cxx b/Source/cmakemain.cxx index c8cf2d4..7d33f04 100644 --- a/Source/cmakemain.cxx +++ b/Source/cmakemain.cxx @@ -154,7 +154,7 @@ static void cmakemainProgressCallback(const char *m, float prog, if ((mf) && (strstr(m, "Configuring")==m) && (prog<0)) { dir = " "; - dir += mf->GetCurrentDirectory(); + dir += mf->GetCurrentSourceDirectory(); } else if ((mf) && (strstr(m, "Generating")==m)) { -- cgit v0.12 From 54d6a9187f24bbff9e344d8aa6b3c0d66167094d Mon Sep 17 00:00:00 2001 From: Stephen Kelly Date: Thu, 16 Apr 2015 21:33:09 +0200 Subject: cmMakefile: Rename GetCurrent{Output,Binary}Directory. Match names used in CMake code. --- Source/cmAddCustomCommandCommand.cxx | 4 ++-- Source/cmAddCustomTargetCommand.cxx | 4 ++-- Source/cmAddSubDirectoryCommand.cxx | 4 ++-- Source/cmCPluginAPI.cxx | 2 +- Source/cmConfigureFileCommand.cxx | 2 +- Source/cmCreateTestSourceList.cxx | 2 +- Source/cmDependsFortran.cxx | 2 +- Source/cmExportCommand.cxx | 4 ++-- Source/cmExtraCodeBlocksGenerator.cxx | 2 +- Source/cmExtraEclipseCDT4Generator.cxx | 4 ++-- Source/cmExtraKateGenerator.cxx | 2 +- Source/cmFLTKWrapUICommand.cxx | 2 +- Source/cmFileCommand.cxx | 4 ++-- Source/cmGlobalNinjaGenerator.cxx | 2 +- Source/cmGlobalUnixMakefileGenerator3.cxx | 2 +- Source/cmGlobalVisualStudio10Generator.cxx | 4 ++-- Source/cmGlobalVisualStudio8Generator.cxx | 4 ++-- Source/cmGlobalVisualStudioGenerator.cxx | 2 +- Source/cmGlobalXCodeGenerator.cxx | 22 +++++++++++----------- Source/cmInstallExportGenerator.cxx | 2 +- Source/cmInstallFilesCommand.cxx | 2 +- Source/cmInstallProgramsCommand.cxx | 2 +- Source/cmLocalGenerator.cxx | 6 +++--- Source/cmLocalUnixMakefileGenerator3.cxx | 4 ++-- Source/cmLocalVisualStudio6Generator.cxx | 2 +- Source/cmLocalVisualStudio7Generator.cxx | 4 ++-- Source/cmMakefile.h | 2 +- Source/cmMakefileTargetGenerator.cxx | 4 ++-- Source/cmProjectCommand.cxx | 4 ++-- Source/cmQTWrapCPPCommand.cxx | 4 ++-- Source/cmQTWrapUICommand.cxx | 8 ++++---- Source/cmQtAutoGenerators.cxx | 6 +++--- Source/cmSourceFile.cxx | 2 +- Source/cmSourceFileLocation.cxx | 6 +++--- Source/cmSubdirCommand.cxx | 4 ++-- Source/cmTarget.cxx | 2 +- Source/cmUtilitySourceCommand.cxx | 2 +- Source/cmVisualStudio10TargetGenerator.cxx | 4 ++-- Source/cmakemain.cxx | 2 +- 39 files changed, 73 insertions(+), 73 deletions(-) diff --git a/Source/cmAddCustomCommandCommand.cxx b/Source/cmAddCustomCommandCommand.cxx index 8fb49ca..ba9e663 100644 --- a/Source/cmAddCustomCommandCommand.cxx +++ b/Source/cmAddCustomCommandCommand.cxx @@ -168,7 +168,7 @@ bool cmAddCustomCommandCommand // and later references "${CMAKE_CURRENT_SOURCE_DIR}/out.txt". // This is fairly obscure so we can wait for someone to // complain. - filename = this->Makefile->GetCurrentOutputDirectory(); + filename = this->Makefile->GetCurrentBinaryDirectory(); filename += "/"; } filename += copy; @@ -315,7 +315,7 @@ bool cmAddCustomCommandCommand // Convert working directory to a full path. if(!working.empty()) { - const char* build_dir = this->Makefile->GetCurrentOutputDirectory(); + const char* build_dir = this->Makefile->GetCurrentBinaryDirectory(); working = cmSystemTools::CollapseFullPath(working, build_dir); } diff --git a/Source/cmAddCustomTargetCommand.cxx b/Source/cmAddCustomTargetCommand.cxx index a0e20c8..c246aee 100644 --- a/Source/cmAddCustomTargetCommand.cxx +++ b/Source/cmAddCustomTargetCommand.cxx @@ -138,7 +138,7 @@ bool cmAddCustomTargetCommand std::string filename; if (!cmSystemTools::FileIsFullPath(copy.c_str())) { - filename = this->Makefile->GetCurrentOutputDirectory(); + filename = this->Makefile->GetCurrentBinaryDirectory(); filename += "/"; } filename += copy; @@ -240,7 +240,7 @@ bool cmAddCustomTargetCommand // Convert working directory to a full path. if(!working_directory.empty()) { - const char* build_dir = this->Makefile->GetCurrentOutputDirectory(); + const char* build_dir = this->Makefile->GetCurrentBinaryDirectory(); working_directory = cmSystemTools::CollapseFullPath(working_directory, build_dir); } diff --git a/Source/cmAddSubDirectoryCommand.cxx b/Source/cmAddSubDirectoryCommand.cxx index bae76d2..69c6a14 100644 --- a/Source/cmAddSubDirectoryCommand.cxx +++ b/Source/cmAddSubDirectoryCommand.cxx @@ -94,7 +94,7 @@ bool cmAddSubDirectoryCommand::InitialPass // Remove the CurrentDirectory from the srcPath and replace it // with the CurrentOutputDirectory. const char* src = this->Makefile->GetCurrentSourceDirectory(); - const char* bin = this->Makefile->GetCurrentOutputDirectory(); + const char* bin = this->Makefile->GetCurrentBinaryDirectory(); size_t srcLen = strlen(src); size_t binLen = strlen(bin); if(srcLen > 0 && src[srcLen-1] == '/') @@ -113,7 +113,7 @@ bool cmAddSubDirectoryCommand::InitialPass } else { - binPath = this->Makefile->GetCurrentOutputDirectory(); + binPath = this->Makefile->GetCurrentBinaryDirectory(); binPath += "/"; binPath += binArg; } diff --git a/Source/cmCPluginAPI.cxx b/Source/cmCPluginAPI.cxx index d0d30b2..4f1fa3c 100644 --- a/Source/cmCPluginAPI.cxx +++ b/Source/cmCPluginAPI.cxx @@ -146,7 +146,7 @@ const char* CCONV cmGetCurrentDirectory(void *arg) const char* CCONV cmGetCurrentOutputDirectory(void *arg) { cmMakefile *mf = static_cast(arg); - return mf->GetCurrentOutputDirectory(); + return mf->GetCurrentBinaryDirectory(); } const char* CCONV cmGetDefinition(void *arg,const char*def) { diff --git a/Source/cmConfigureFileCommand.cxx b/Source/cmConfigureFileCommand.cxx index 967d54d..46b71c5 100644 --- a/Source/cmConfigureFileCommand.cxx +++ b/Source/cmConfigureFileCommand.cxx @@ -45,7 +45,7 @@ bool cmConfigureFileCommand const char* outFile = args[1].c_str(); if(!cmSystemTools::FileIsFullPath(outFile)) { - this->OutputFile = this->Makefile->GetCurrentOutputDirectory(); + this->OutputFile = this->Makefile->GetCurrentBinaryDirectory(); this->OutputFile += "/"; } this->OutputFile += outFile; diff --git a/Source/cmCreateTestSourceList.cxx b/Source/cmCreateTestSourceList.cxx index f93d3df..54c27d6 100644 --- a/Source/cmCreateTestSourceList.cxx +++ b/Source/cmCreateTestSourceList.cxx @@ -73,7 +73,7 @@ bool cmCreateTestSourceList "You must specify a file extension for the test driver file."); return false; } - std::string driver = this->Makefile->GetCurrentOutputDirectory(); + std::string driver = this->Makefile->GetCurrentBinaryDirectory(); driver += "/"; driver += *i; ++i; diff --git a/Source/cmDependsFortran.cxx b/Source/cmDependsFortran.cxx index d9818ce..f12116e 100644 --- a/Source/cmDependsFortran.cxx +++ b/Source/cmDependsFortran.cxx @@ -237,7 +237,7 @@ bool cmDependsFortran::Finalize(std::ostream& makeDepends, else { mod_dir = - this->LocalGenerator->GetMakefile()->GetCurrentOutputDirectory(); + this->LocalGenerator->GetMakefile()->GetCurrentBinaryDirectory(); } // Actually write dependencies to the streams. diff --git a/Source/cmExportCommand.cxx b/Source/cmExportCommand.cxx index 76283d4..06541c0 100644 --- a/Source/cmExportCommand.cxx +++ b/Source/cmExportCommand.cxx @@ -113,7 +113,7 @@ bool cmExportCommand else { // Interpret relative paths with respect to the current build dir. - std::string dir = this->Makefile->GetCurrentOutputDirectory(); + std::string dir = this->Makefile->GetCurrentBinaryDirectory(); fname = dir + "/" + fname; } @@ -295,7 +295,7 @@ bool cmExportCommand::HandlePackage(std::vector const& args) // We store the current build directory in the registry as a value // named by a hash of its own content. This is deterministic and is // unique with high probability. - const char* outDir = this->Makefile->GetCurrentOutputDirectory(); + const char* outDir = this->Makefile->GetCurrentBinaryDirectory(); std::string hash = cmSystemTools::ComputeStringMD5(outDir); #if defined(_WIN32) && !defined(__CYGWIN__) this->StorePackageRegistryWin(package, outDir, hash.c_str()); diff --git a/Source/cmExtraCodeBlocksGenerator.cxx b/Source/cmExtraCodeBlocksGenerator.cxx index 554b686..dfa2cb1 100644 --- a/Source/cmExtraCodeBlocksGenerator.cxx +++ b/Source/cmExtraCodeBlocksGenerator.cxx @@ -524,7 +524,7 @@ std::string cmExtraCodeBlocksGenerator::CreateDummyTargetFile( // this file doesn't seem to be used by C::B in custom makefile mode, // but we generate a unique file for each OBJECT library so in case // C::B uses it in some way, the targets don't interfere with each other. - std::string filename = mf->GetCurrentOutputDirectory(); + std::string filename = mf->GetCurrentBinaryDirectory(); filename += "/"; filename += mf->GetLocalGenerator()->GetTargetDirectory(*target); filename += "/"; diff --git a/Source/cmExtraEclipseCDT4Generator.cxx b/Source/cmExtraEclipseCDT4Generator.cxx index 2aa4d93..668dcd8 100644 --- a/Source/cmExtraEclipseCDT4Generator.cxx +++ b/Source/cmExtraEclipseCDT4Generator.cxx @@ -1033,7 +1033,7 @@ void cmExtraEclipseCDT4Generator::CreateCProjectFile() const { const cmTargets& targets = (*it)->GetMakefile()->GetTargets(); cmMakefile* makefile=(*it)->GetMakefile(); - std::string subdir = (*it)->Convert(makefile->GetCurrentOutputDirectory(), + std::string subdir = (*it)->Convert(makefile->GetCurrentBinaryDirectory(), cmLocalGenerator::HOME_OUTPUT); if (subdir == ".") { @@ -1094,7 +1094,7 @@ void cmExtraEclipseCDT4Generator::CreateCProjectFile() const ti->first.c_str()); std::string cleanArgs = "-E chdir \""; - cleanArgs += makefile->GetCurrentOutputDirectory(); + cleanArgs += makefile->GetCurrentBinaryDirectory(); cleanArgs += "\" \""; cleanArgs += cmake; cleanArgs += "\" -P \""; diff --git a/Source/cmExtraKateGenerator.cxx b/Source/cmExtraKateGenerator.cxx index 9645d0e..ec141a9 100644 --- a/Source/cmExtraKateGenerator.cxx +++ b/Source/cmExtraKateGenerator.cxx @@ -123,7 +123,7 @@ cmExtraKateGenerator::WriteTargets(const cmMakefile* mf, { const cmTargets& targets = (*it)->GetMakefile()->GetTargets(); cmMakefile* makefile=(*it)->GetMakefile(); - std::string currentDir = makefile->GetCurrentOutputDirectory(); + std::string currentDir = makefile->GetCurrentBinaryDirectory(); bool topLevel = (currentDir == makefile->GetHomeOutputDirectory()); for(cmTargets::const_iterator ti=targets.begin(); ti!=targets.end(); ++ti) diff --git a/Source/cmFLTKWrapUICommand.cxx b/Source/cmFLTKWrapUICommand.cxx index 5000fd2..5e94fa1 100644 --- a/Source/cmFLTKWrapUICommand.cxx +++ b/Source/cmFLTKWrapUICommand.cxx @@ -32,7 +32,7 @@ bool cmFLTKWrapUICommand this->Target = args[0]; // Target that will use the generated files // get the list of GUI files from which .cxx and .h will be generated - std::string outputDirectory = this->Makefile->GetCurrentOutputDirectory(); + std::string outputDirectory = this->Makefile->GetCurrentBinaryDirectory(); { // Some of the generated files are *.h so the directory "GUI" diff --git a/Source/cmFileCommand.cxx b/Source/cmFileCommand.cxx index a0ba885..14f397c 100644 --- a/Source/cmFileCommand.cxx +++ b/Source/cmFileCommand.cxx @@ -645,7 +645,7 @@ bool cmFileCommand::HandleStringsCommand(std::vector const& args) if (hex_conversion_enabled) { // TODO: should work without temp file, but just on a memory buffer - std::string binaryFileName = this->Makefile->GetCurrentOutputDirectory(); + std::string binaryFileName = this->Makefile->GetCurrentBinaryDirectory(); binaryFileName += cmake::GetCMakeFilesDirectory(); binaryFileName += "/FileCommandStringsBinaryFile"; if(cmHexFileConverter::TryConvert(fileName.c_str(),binaryFileName.c_str())) @@ -1568,7 +1568,7 @@ bool cmFileCopier::CheckValue(std::string const& arg) } else { - this->Destination = this->Makefile->GetCurrentOutputDirectory(); + this->Destination = this->Makefile->GetCurrentBinaryDirectory(); this->Destination += "/" + arg; } this->Doing = DoingNone; diff --git a/Source/cmGlobalNinjaGenerator.cxx b/Source/cmGlobalNinjaGenerator.cxx index 505914e..4572a94 100644 --- a/Source/cmGlobalNinjaGenerator.cxx +++ b/Source/cmGlobalNinjaGenerator.cxx @@ -679,7 +679,7 @@ void cmGlobalNinjaGenerator // Compute full path to object file directory for this target. std::string dir; - dir += gt->Makefile->GetCurrentOutputDirectory(); + dir += gt->Makefile->GetCurrentBinaryDirectory(); dir += "/"; dir += gt->LocalGenerator->GetTargetDirectory(*target); dir += "/"; diff --git a/Source/cmGlobalUnixMakefileGenerator3.cxx b/Source/cmGlobalUnixMakefileGenerator3.cxx index 73d3dc2..7f1980a 100644 --- a/Source/cmGlobalUnixMakefileGenerator3.cxx +++ b/Source/cmGlobalUnixMakefileGenerator3.cxx @@ -113,7 +113,7 @@ cmGlobalUnixMakefileGenerator3 // Compute full path to object file directory for this target. std::string dir; - dir += gt->Makefile->GetCurrentOutputDirectory(); + dir += gt->Makefile->GetCurrentBinaryDirectory(); dir += "/"; dir += gt->LocalGenerator->GetTargetDirectory(*target); dir += "/"; diff --git a/Source/cmGlobalVisualStudio10Generator.cxx b/Source/cmGlobalVisualStudio10Generator.cxx index 231b679..8240099 100644 --- a/Source/cmGlobalVisualStudio10Generator.cxx +++ b/Source/cmGlobalVisualStudio10Generator.cxx @@ -338,7 +338,7 @@ void cmGlobalVisualStudio10Generator::Generate() " " << this->LongestSource.SourceFile->GetFullPath() << "\n" "This is because some Visual Studio tools would append the relative " "path to the end of the referencing directory path, as in:\n" - " " << mf->GetCurrentOutputDirectory() << "/" + " " << mf->GetCurrentBinaryDirectory() << "/" << this->LongestSource.SourceRel << "\n" "and then incorrectly complain that the file does not exist because " "the path length is too long for some internal buffer or API. " @@ -585,7 +585,7 @@ cmGlobalVisualStudio10Generator void cmGlobalVisualStudio10Generator::PathTooLong( cmTarget* target, cmSourceFile const* sf, std::string const& sfRel) { - size_t len = (strlen(target->GetMakefile()->GetCurrentOutputDirectory()) + + size_t len = (strlen(target->GetMakefile()->GetCurrentBinaryDirectory()) + 1 + sfRel.length()); if(len > this->LongestSource.Length) { diff --git a/Source/cmGlobalVisualStudio8Generator.cxx b/Source/cmGlobalVisualStudio8Generator.cxx index 726db0f..bb50633 100644 --- a/Source/cmGlobalVisualStudio8Generator.cxx +++ b/Source/cmGlobalVisualStudio8Generator.cxx @@ -281,7 +281,7 @@ bool cmGlobalVisualStudio8Generator::AddCheckTarget() stampList += "generate.stamp.list"; { std::string stampListFile = - generators[0]->GetMakefile()->GetCurrentOutputDirectory(); + generators[0]->GetMakefile()->GetCurrentBinaryDirectory(); stampListFile += "/"; stampListFile += stampList; std::string stampFile; @@ -289,7 +289,7 @@ bool cmGlobalVisualStudio8Generator::AddCheckTarget() for(std::vector::const_iterator gi = generators.begin(); gi != generators.end(); ++gi) { - stampFile = (*gi)->GetMakefile()->GetCurrentOutputDirectory(); + stampFile = (*gi)->GetMakefile()->GetCurrentBinaryDirectory(); stampFile += "/"; stampFile += cmake::GetCMakeFilesDirectoryPostSlash(); stampFile += "generate.stamp"; diff --git a/Source/cmGlobalVisualStudioGenerator.cxx b/Source/cmGlobalVisualStudioGenerator.cxx index 320a1f4..4184436 100644 --- a/Source/cmGlobalVisualStudioGenerator.cxx +++ b/Source/cmGlobalVisualStudioGenerator.cxx @@ -121,7 +121,7 @@ void cmGlobalVisualStudioGenerator::Generate() void cmGlobalVisualStudioGenerator ::ComputeTargetObjectDirectory(cmGeneratorTarget* gt) const { - std::string dir = gt->Makefile->GetCurrentOutputDirectory(); + std::string dir = gt->Makefile->GetCurrentBinaryDirectory(); dir += "/"; std::string tgtDir = gt->LocalGenerator->GetTargetDirectory(*gt->Target); if(!tgtDir.empty()) diff --git a/Source/cmGlobalXCodeGenerator.cxx b/Source/cmGlobalXCodeGenerator.cxx index c8e7632..daeb616 100644 --- a/Source/cmGlobalXCodeGenerator.cxx +++ b/Source/cmGlobalXCodeGenerator.cxx @@ -409,11 +409,11 @@ void cmGlobalXCodeGenerator::SetGenerationRoot(cmLocalGenerator* root) this->SetCurrentLocalGenerator(root); cmSystemTools::SplitPath(this->CurrentMakefile->GetCurrentSourceDirectory(), this->ProjectSourceDirectoryComponents); - cmSystemTools::SplitPath(this->CurrentMakefile->GetCurrentOutputDirectory(), + cmSystemTools::SplitPath(this->CurrentMakefile->GetCurrentBinaryDirectory(), this->ProjectOutputDirectoryComponents); this->CurrentXCodeHackMakefile = - root->GetMakefile()->GetCurrentOutputDirectory(); + root->GetMakefile()->GetCurrentBinaryDirectory(); this->CurrentXCodeHackMakefile += "/CMakeScripts"; cmSystemTools::MakeDirectory(this->CurrentXCodeHackMakefile.c_str()); this->CurrentXCodeHackMakefile += "/XCODE_DEPEND_HELPER.make"; @@ -459,7 +459,7 @@ cmGlobalXCodeGenerator::AddExtraTargets(cmLocalGenerator* root, allbuild->AddSourceCMP0049(listfile.c_str()); // Add XCODE depend helper - std::string dir = mf->GetCurrentOutputDirectory(); + std::string dir = mf->GetCurrentBinaryDirectory(); cmCustomCommandLine makeHelper; if(this->XcodeVersion < 50) { @@ -1012,7 +1012,7 @@ void cmGlobalXCodeGenerator::SetCurrentLocalGenerator(cmLocalGenerator* gen) this->CurrentMakefile = gen->GetMakefile(); std::string outdir = cmSystemTools::CollapseFullPath(this->CurrentMakefile-> - GetCurrentOutputDirectory()); + GetCurrentBinaryDirectory()); cmSystemTools::SplitPath(outdir.c_str(), this->CurrentOutputDirectoryComponents); @@ -1366,7 +1366,7 @@ void cmGlobalXCodeGenerator::ForceLinkerLanguage(cmTarget& cmtarget) // linker language. This should convince Xcode to choose the proper // language. cmMakefile* mf = cmtarget.GetMakefile(); - std::string fname = mf->GetCurrentOutputDirectory(); + std::string fname = mf->GetCurrentBinaryDirectory(); fname += cmake::GetCMakeFilesDirectory(); fname += "/"; fname += cmtarget.GetName(); @@ -1594,7 +1594,7 @@ cmGlobalXCodeGenerator::AddCommandsToBuildPhase(cmXCodeObject* buildphase, const & commands, const char* name) { - std::string dir = this->CurrentMakefile->GetCurrentOutputDirectory(); + std::string dir = this->CurrentMakefile->GetCurrentBinaryDirectory(); dir += "/CMakeScripts"; cmSystemTools::MakeDirectory(dir.c_str()); std::string makefile = dir; @@ -1615,7 +1615,7 @@ cmGlobalXCodeGenerator::AddCommandsToBuildPhase(cmXCodeObject* buildphase, currentConfig->c_str()); } - std::string cdir = this->CurrentMakefile->GetCurrentOutputDirectory(); + std::string cdir = this->CurrentMakefile->GetCurrentBinaryDirectory(); cdir = this->ConvertToRelativeForXCode(cdir.c_str()); std::string makecmd = "make -C "; makecmd += cdir; @@ -1943,7 +1943,7 @@ void cmGlobalXCodeGenerator::CreateBuildSettings(cmTarget& target, } // Set attributes to specify the proper name for the target. - std::string pndir = this->CurrentMakefile->GetCurrentOutputDirectory(); + std::string pndir = this->CurrentMakefile->GetCurrentBinaryDirectory(); if(target.GetType() == cmTarget::STATIC_LIBRARY || target.GetType() == cmTarget::SHARED_LIBRARY || target.GetType() == cmTarget::MODULE_LIBRARY || @@ -3454,7 +3454,7 @@ bool cmGlobalXCodeGenerator } } - std::string symroot = root->GetMakefile()->GetCurrentOutputDirectory(); + std::string symroot = root->GetMakefile()->GetCurrentBinaryDirectory(); symroot += "/build"; buildSettings->AddAttribute("SYMROOT", this->CreateString(symroot.c_str())); @@ -3516,7 +3516,7 @@ cmGlobalXCodeGenerator::GetObjectsNormalDirectory( const cmTarget *t) const { std::string dir = - t->GetMakefile()->GetCurrentOutputDirectory(); + t->GetMakefile()->GetCurrentBinaryDirectory(); dir += "/"; dir += projName; dir += ".build/"; @@ -4016,7 +4016,7 @@ void cmGlobalXCodeGenerator::AppendFlag(std::string& flags, std::string cmGlobalXCodeGenerator::ComputeInfoPListLocation(cmTarget& target) { - std::string plist = target.GetMakefile()->GetCurrentOutputDirectory(); + std::string plist = target.GetMakefile()->GetCurrentBinaryDirectory(); plist += cmake::GetCMakeFilesDirectory(); plist += "/"; plist += target.GetName(); diff --git a/Source/cmInstallExportGenerator.cxx b/Source/cmInstallExportGenerator.cxx index 38c80df..7f6aa4d 100644 --- a/Source/cmInstallExportGenerator.cxx +++ b/Source/cmInstallExportGenerator.cxx @@ -59,7 +59,7 @@ void cmInstallExportGenerator::ComputeTempDir() { // Choose a temporary directory in which to generate the import // files to be installed. - this->TempDir = this->Makefile->GetCurrentOutputDirectory(); + this->TempDir = this->Makefile->GetCurrentBinaryDirectory(); this->TempDir += cmake::GetCMakeFilesDirectory(); this->TempDir += "/Export"; if(this->Destination.empty()) diff --git a/Source/cmInstallFilesCommand.cxx b/Source/cmInstallFilesCommand.cxx index 64556d0..1fe435c 100644 --- a/Source/cmInstallFilesCommand.cxx +++ b/Source/cmInstallFilesCommand.cxx @@ -152,7 +152,7 @@ std::string cmInstallFilesCommand::FindInstallSource(const char* name) const } // This is a relative path. - std::string tb = this->Makefile->GetCurrentOutputDirectory(); + std::string tb = this->Makefile->GetCurrentBinaryDirectory(); tb += "/"; tb += name; std::string ts = this->Makefile->GetCurrentSourceDirectory(); diff --git a/Source/cmInstallProgramsCommand.cxx b/Source/cmInstallProgramsCommand.cxx index db1ee79..4899b95 100644 --- a/Source/cmInstallProgramsCommand.cxx +++ b/Source/cmInstallProgramsCommand.cxx @@ -115,7 +115,7 @@ std::string cmInstallProgramsCommand } // This is a relative path. - std::string tb = this->Makefile->GetCurrentOutputDirectory(); + std::string tb = this->Makefile->GetCurrentBinaryDirectory(); tb += "/"; tb += name; std::string ts = this->Makefile->GetCurrentSourceDirectory(); diff --git a/Source/cmLocalGenerator.cxx b/Source/cmLocalGenerator.cxx index 5e47b91..d3544c5 100644 --- a/Source/cmLocalGenerator.cxx +++ b/Source/cmLocalGenerator.cxx @@ -423,7 +423,7 @@ void cmLocalGenerator::GenerateInstallRules() // Create the install script file. std::string file = this->Makefile->GetStartOutputDirectory(); std::string homedir = this->Makefile->GetHomeOutputDirectory(); - std::string currdir = this->Makefile->GetCurrentOutputDirectory(); + std::string currdir = this->Makefile->GetCurrentBinaryDirectory(); cmSystemTools::ConvertToUnixSlashes(file); cmSystemTools::ConvertToUnixSlashes(homedir); cmSystemTools::ConvertToUnixSlashes(currdir); @@ -669,12 +669,12 @@ void cmLocalGenerator::AddBuildTargetRule(const std::string& llang, !sf->GetPropertyAsBool("EXTERNAL_OBJECT")) { std::string dir_max; - dir_max += this->Makefile->GetCurrentOutputDirectory(); + dir_max += this->Makefile->GetCurrentBinaryDirectory(); dir_max += "/"; std::string obj = this->GetObjectFileNameWithoutTarget(*sf, dir_max); if(!obj.empty()) { - std::string ofname = this->Makefile->GetCurrentOutputDirectory(); + std::string ofname = this->Makefile->GetCurrentBinaryDirectory(); ofname += "/"; ofname += obj; objVector.push_back(ofname); diff --git a/Source/cmLocalUnixMakefileGenerator3.cxx b/Source/cmLocalUnixMakefileGenerator3.cxx index 153ed09..eb0f7bf 100644 --- a/Source/cmLocalUnixMakefileGenerator3.cxx +++ b/Source/cmLocalUnixMakefileGenerator3.cxx @@ -205,7 +205,7 @@ GetLocalObjectFiles(std::map &localObjectFiles) ->GetSafeDefinition("CMAKE_BUILD_TYPE")); // Compute full path to object file directory for this target. std::string dir; - dir += gt->Makefile->GetCurrentOutputDirectory(); + dir += gt->Makefile->GetCurrentBinaryDirectory(); dir += "/"; dir += this->GetTargetDirectory(*gt->Target); dir += "/"; @@ -1236,7 +1236,7 @@ cmLocalUnixMakefileGenerator3 const std::vector& files, cmTarget& target, const char* filename) { - std::string cleanfile = this->Makefile->GetCurrentOutputDirectory(); + std::string cleanfile = this->Makefile->GetCurrentBinaryDirectory(); cleanfile += "/"; cleanfile += this->GetTargetDirectory(target); cleanfile += "/cmake_clean"; diff --git a/Source/cmLocalVisualStudio6Generator.cxx b/Source/cmLocalVisualStudio6Generator.cxx index 6844fee..0b6d214 100644 --- a/Source/cmLocalVisualStudio6Generator.cxx +++ b/Source/cmLocalVisualStudio6Generator.cxx @@ -1968,7 +1968,7 @@ cmLocalVisualStudio6Generator // files directory for any configuration. This is used to construct // object file names that do not produce paths that are too long. std::string dir_max; - dir_max += this->Makefile->GetCurrentOutputDirectory(); + dir_max += this->Makefile->GetCurrentBinaryDirectory(); dir_max += "/"; dir_max += config_max; dir_max += "/"; diff --git a/Source/cmLocalVisualStudio7Generator.cxx b/Source/cmLocalVisualStudio7Generator.cxx index 884212b..83fde3a 100644 --- a/Source/cmLocalVisualStudio7Generator.cxx +++ b/Source/cmLocalVisualStudio7Generator.cxx @@ -286,7 +286,7 @@ void cmLocalVisualStudio7Generator //---------------------------------------------------------------------------- cmSourceFile* cmLocalVisualStudio7Generator::CreateVCProjBuildRule() { - std::string stampName = this->Makefile->GetCurrentOutputDirectory(); + std::string stampName = this->Makefile->GetCurrentBinaryDirectory(); stampName += "/"; stampName += cmake::GetCMakeFilesDirectoryPostSlash(); stampName += "generate.stamp"; @@ -1707,7 +1707,7 @@ cmLocalVisualStudio7Generator // files directory for any configuration. This is used to construct // object file names that do not produce paths that are too long. std::string dir_max; - dir_max += this->Makefile->GetCurrentOutputDirectory(); + dir_max += this->Makefile->GetCurrentBinaryDirectory(); dir_max += "/"; dir_max += this->GetTargetDirectory(target); dir_max += "/"; diff --git a/Source/cmMakefile.h b/Source/cmMakefile.h index 8aec647..3211813 100644 --- a/Source/cmMakefile.h +++ b/Source/cmMakefile.h @@ -488,7 +488,7 @@ public: { return this->cmStartDirectory.c_str(); } - const char* GetCurrentOutputDirectory() const + const char* GetCurrentBinaryDirectory() const { return this->StartOutputDirectory.c_str(); } diff --git a/Source/cmMakefileTargetGenerator.cxx b/Source/cmMakefileTargetGenerator.cxx index 0076caf..97982bf 100644 --- a/Source/cmMakefileTargetGenerator.cxx +++ b/Source/cmMakefileTargetGenerator.cxx @@ -495,7 +495,7 @@ void cmMakefileTargetGenerator this->WriteObjectBuildFile(obj, lang, source, depends); // The object file should be checked for dependency integrity. - std::string objFullPath = this->Makefile->GetCurrentOutputDirectory(); + std::string objFullPath = this->Makefile->GetCurrentBinaryDirectory(); objFullPath += "/"; objFullPath += obj; objFullPath = @@ -1968,7 +1968,7 @@ const char* cmMakefileTargetGenerator::GetFortranModuleDirectory() { // Interpret relative to the current output directory. this->FortranModuleDirectory = - this->Makefile->GetCurrentOutputDirectory(); + this->Makefile->GetCurrentBinaryDirectory(); this->FortranModuleDirectory += "/"; this->FortranModuleDirectory += target_mod_dir; } diff --git a/Source/cmProjectCommand.cxx b/Source/cmProjectCommand.cxx index af62b0b..afacc1b 100644 --- a/Source/cmProjectCommand.cxx +++ b/Source/cmProjectCommand.cxx @@ -29,7 +29,7 @@ bool cmProjectCommand this->Makefile->AddCacheDefinition (bindir, - this->Makefile->GetCurrentOutputDirectory(), + this->Makefile->GetCurrentBinaryDirectory(), "Value Computed by CMake", cmState::STATIC); this->Makefile->AddCacheDefinition (srcdir, @@ -40,7 +40,7 @@ bool cmProjectCommand srcdir = "PROJECT_SOURCE_DIR"; this->Makefile->AddDefinition(bindir, - this->Makefile->GetCurrentOutputDirectory()); + this->Makefile->GetCurrentBinaryDirectory()); this->Makefile->AddDefinition(srcdir, this->Makefile->GetCurrentSourceDirectory()); diff --git a/Source/cmQTWrapCPPCommand.cxx b/Source/cmQTWrapCPPCommand.cxx index 655bf82..aae1bb9 100644 --- a/Source/cmQTWrapCPPCommand.cxx +++ b/Source/cmQTWrapCPPCommand.cxx @@ -41,7 +41,7 @@ bool cmQTWrapCPPCommand::InitialPass(std::vector const& args, // Compute the name of the file to generate. std::string srcName = cmSystemTools::GetFilenameWithoutLastExtension(*j); - std::string newName = this->Makefile->GetCurrentOutputDirectory(); + std::string newName = this->Makefile->GetCurrentBinaryDirectory(); newName += "/moc_"; newName += srcName; newName += ".cxx"; @@ -62,7 +62,7 @@ bool cmQTWrapCPPCommand::InitialPass(std::vector const& args, { if(curr && curr->GetPropertyAsBool("GENERATED")) { - hname = this->Makefile->GetCurrentOutputDirectory(); + hname = this->Makefile->GetCurrentBinaryDirectory(); } else { diff --git a/Source/cmQTWrapUICommand.cxx b/Source/cmQTWrapUICommand.cxx index b1e43b8..3adea29 100644 --- a/Source/cmQTWrapUICommand.cxx +++ b/Source/cmQTWrapUICommand.cxx @@ -46,15 +46,15 @@ bool cmQTWrapUICommand::InitialPass(std::vector const& args, // Compute the name of the files to generate. std::string srcName = cmSystemTools::GetFilenameWithoutLastExtension(*j); - std::string hName = this->Makefile->GetCurrentOutputDirectory(); + std::string hName = this->Makefile->GetCurrentBinaryDirectory(); hName += "/"; hName += srcName; hName += ".h"; - std::string cxxName = this->Makefile->GetCurrentOutputDirectory(); + std::string cxxName = this->Makefile->GetCurrentBinaryDirectory(); cxxName += "/"; cxxName += srcName; cxxName += ".cxx"; - std::string mocName = this->Makefile->GetCurrentOutputDirectory(); + std::string mocName = this->Makefile->GetCurrentBinaryDirectory(); mocName += "/moc_"; mocName += srcName; mocName += ".cxx"; @@ -69,7 +69,7 @@ bool cmQTWrapUICommand::InitialPass(std::vector const& args, { if(curr && curr->GetPropertyAsBool("GENERATED")) { - uiName = this->Makefile->GetCurrentOutputDirectory(); + uiName = this->Makefile->GetCurrentBinaryDirectory(); } else { diff --git a/Source/cmQtAutoGenerators.cxx b/Source/cmQtAutoGenerators.cxx index 3d5103f..9e75663 100644 --- a/Source/cmQtAutoGenerators.cxx +++ b/Source/cmQtAutoGenerators.cxx @@ -162,7 +162,7 @@ static std::string getAutogenTargetName(cmTarget const* target) static std::string getAutogenTargetDir(cmTarget const* target) { cmMakefile* makefile = target->GetMakefile(); - std::string targetDir = makefile->GetCurrentOutputDirectory(); + std::string targetDir = makefile->GetCurrentBinaryDirectory(); targetDir += makefile->GetCMakeInstance()->GetCMakeFilesDirectory(); targetDir += "/"; targetDir += getAutogenTargetName(target); @@ -291,7 +291,7 @@ bool cmQtAutoGenerators::InitializeAutogenTarget(cmTarget* target) if (target->GetPropertyAsBool("AUTOMOC")) { std::string automocTargetName = getAutogenTargetName(target); - std::string mocCppFile = makefile->GetCurrentOutputDirectory(); + std::string mocCppFile = makefile->GetCurrentBinaryDirectory(); mocCppFile += "/"; mocCppFile += automocTargetName; mocCppFile += ".cpp"; @@ -317,7 +317,7 @@ bool cmQtAutoGenerators::InitializeAutogenTarget(cmTarget* target) commandLines.push_back(currentLine); std::string workingDirectory = cmSystemTools::CollapseFullPath( - "", makefile->GetCurrentOutputDirectory()); + "", makefile->GetCurrentBinaryDirectory()); std::vector depends; if (const char *autogenDepends = diff --git a/Source/cmSourceFile.cxx b/Source/cmSourceFile.cxx index c28d7b4..cdd04ed 100644 --- a/Source/cmSourceFile.cxx +++ b/Source/cmSourceFile.cxx @@ -163,7 +163,7 @@ bool cmSourceFile::FindFullPath(std::string* error) if(this->Location.DirectoryIsAmbiguous()) { tryDirs[0] = mf->GetCurrentSourceDirectory(); - tryDirs[1] = mf->GetCurrentOutputDirectory(); + tryDirs[1] = mf->GetCurrentBinaryDirectory(); } else { diff --git a/Source/cmSourceFileLocation.cxx b/Source/cmSourceFileLocation.cxx index d88a5f2..a0eba5e 100644 --- a/Source/cmSourceFileLocation.cxx +++ b/Source/cmSourceFileLocation.cxx @@ -106,7 +106,7 @@ void cmSourceFileLocation::DirectoryUseBinary() { this->Directory = cmSystemTools::CollapseFullPath( - this->Directory, this->Makefile->GetCurrentOutputDirectory()); + this->Directory, this->Makefile->GetCurrentBinaryDirectory()); this->AmbiguousDirectory = false; } } @@ -285,7 +285,7 @@ bool cmSourceFileLocation::Matches(cmSourceFileLocation const& loc) this->Directory, this->Makefile->GetCurrentSourceDirectory()); std::string const& binDir = cmSystemTools::CollapseFullPath( - this->Directory, this->Makefile->GetCurrentOutputDirectory()); + this->Directory, this->Makefile->GetCurrentBinaryDirectory()); if(srcDir != loc.Directory && binDir != loc.Directory) { @@ -300,7 +300,7 @@ bool cmSourceFileLocation::Matches(cmSourceFileLocation const& loc) loc.Directory, loc.Makefile->GetCurrentSourceDirectory()); std::string const& binDir = cmSystemTools::CollapseFullPath( - loc.Directory, loc.Makefile->GetCurrentOutputDirectory()); + loc.Directory, loc.Makefile->GetCurrentBinaryDirectory()); if(srcDir != this->Directory && binDir != this->Directory) { diff --git a/Source/cmSubdirCommand.cxx b/Source/cmSubdirCommand.cxx index 47198a3..6a4a835 100644 --- a/Source/cmSubdirCommand.cxx +++ b/Source/cmSubdirCommand.cxx @@ -44,7 +44,7 @@ bool cmSubdirCommand if (cmSystemTools::FileIsDirectory(srcPath)) { std::string binPath = - std::string(this->Makefile->GetCurrentOutputDirectory()) + + std::string(this->Makefile->GetCurrentBinaryDirectory()) + "/" + i->c_str(); this->Makefile->AddSubDirectory(srcPath, binPath, excludeFromAll, false); @@ -55,7 +55,7 @@ bool cmSubdirCommand // we must compute the binPath from the srcPath, we just take the last // element from the source path and use that std::string binPath = - std::string(this->Makefile->GetCurrentOutputDirectory()) + + std::string(this->Makefile->GetCurrentBinaryDirectory()) + "/" + cmSystemTools::GetFilenameName(*i); this->Makefile->AddSubDirectory(*i, binPath, excludeFromAll, false); diff --git a/Source/cmTarget.cxx b/Source/cmTarget.cxx index f1540d4..cc6d748 100644 --- a/Source/cmTarget.cxx +++ b/Source/cmTarget.cxx @@ -540,7 +540,7 @@ cmListFileBacktrace const& cmTarget::GetBacktrace() const //---------------------------------------------------------------------------- std::string cmTarget::GetSupportDirectory() const { - std::string dir = this->Makefile->GetCurrentOutputDirectory(); + std::string dir = this->Makefile->GetCurrentBinaryDirectory(); dir += cmake::GetCMakeFilesDirectory(); dir += "/"; dir += this->Name; diff --git a/Source/cmUtilitySourceCommand.cxx b/Source/cmUtilitySourceCommand.cxx index 6f2f950..486328f 100644 --- a/Source/cmUtilitySourceCommand.cxx +++ b/Source/cmUtilitySourceCommand.cxx @@ -93,7 +93,7 @@ bool cmUtilitySourceCommand // The source exists. std::string cmakeCFGout = this->Makefile->GetRequiredDefinition("CMAKE_CFG_INTDIR"); - std::string utilityDirectory = this->Makefile->GetCurrentOutputDirectory(); + std::string utilityDirectory = this->Makefile->GetCurrentBinaryDirectory(); std::string exePath; if (this->Makefile->GetDefinition("EXECUTABLE_OUTPUT_PATH")) { diff --git a/Source/cmVisualStudio10TargetGenerator.cxx b/Source/cmVisualStudio10TargetGenerator.cxx index 838d390..99086de 100644 --- a/Source/cmVisualStudio10TargetGenerator.cxx +++ b/Source/cmVisualStudio10TargetGenerator.cxx @@ -927,7 +927,7 @@ cmVisualStudio10TargetGenerator::ConvertPath(std::string const& path, { return forceRelative ? cmSystemTools::RelativePath( - this->Makefile->GetCurrentOutputDirectory(), path.c_str()) + this->Makefile->GetCurrentBinaryDirectory(), path.c_str()) : this->LocalGenerator->Convert(path.c_str(), cmLocalGenerator::START_OUTPUT, cmLocalGenerator::UNCHANGED, @@ -1430,7 +1430,7 @@ void cmVisualStudio10TargetGenerator::WriteSource( std::string sourceRel = this->ConvertPath(sf->GetFullPath(), true); size_t const maxLen = 250; if(sf->GetCustomCommand() || - ((strlen(this->Makefile->GetCurrentOutputDirectory()) + 1 + + ((strlen(this->Makefile->GetCurrentBinaryDirectory()) + 1 + sourceRel.length()) <= maxLen)) { forceRelative = true; diff --git a/Source/cmakemain.cxx b/Source/cmakemain.cxx index 7d33f04..d82087f 100644 --- a/Source/cmakemain.cxx +++ b/Source/cmakemain.cxx @@ -159,7 +159,7 @@ static void cmakemainProgressCallback(const char *m, float prog, else if ((mf) && (strstr(m, "Generating")==m)) { dir = " "; - dir += mf->GetCurrentOutputDirectory(); + dir += mf->GetCurrentBinaryDirectory(); } if ((prog < 0) || (!dir.empty())) -- cgit v0.12 From 32b8f03acc0357121ec8f2b96599d5eeaf38c0b4 Mon Sep 17 00:00:00 2001 From: Stephen Kelly Date: Thu, 16 Apr 2015 20:06:54 +0200 Subject: cmMakefile: Port users of GetStart* methods to new names. --- Source/cmCPluginAPI.cxx | 4 +- Source/cmExtraCodeBlocksGenerator.cxx | 10 ++--- Source/cmExtraCodeLiteGenerator.cxx | 10 ++--- Source/cmExtraEclipseCDT4Generator.cxx | 4 +- Source/cmExtraQbsGenerator.cxx | 2 +- Source/cmExtraSublimeTextGenerator.cxx | 4 +- Source/cmFLTKWrapUICommand.cxx | 4 +- Source/cmGeneratorTarget.cxx | 4 +- Source/cmGetDirectoryPropertyCommand.cxx | 2 +- Source/cmGlobalBorlandMakefileGenerator.cxx | 2 +- Source/cmGlobalGenerator.cxx | 12 +++--- Source/cmGlobalKdevelopGenerator.cxx | 2 +- Source/cmGlobalNinjaGenerator.cxx | 2 +- Source/cmGlobalUnixMakefileGenerator3.cxx | 14 +++---- Source/cmGlobalVisualStudio6Generator.cxx | 6 +-- Source/cmGlobalVisualStudio7Generator.cxx | 8 ++-- Source/cmGlobalVisualStudioGenerator.cxx | 2 +- Source/cmGlobalXCodeGenerator.cxx | 8 ++-- Source/cmIncludeCommand.cxx | 2 +- Source/cmIncludeDirectoryCommand.cxx | 2 +- Source/cmInstallTargetGenerator.cxx | 2 +- Source/cmLinkDirectoriesCommand.cxx | 2 +- Source/cmLocalGenerator.cxx | 52 +++++++++++++------------- Source/cmLocalGhsMultiGenerator.cxx | 2 +- Source/cmLocalNinjaGenerator.cxx | 4 +- Source/cmLocalUnixMakefileGenerator3.cxx | 18 ++++----- Source/cmLocalVisualStudio6Generator.cxx | 18 ++++----- Source/cmLocalVisualStudio7Generator.cxx | 14 +++---- Source/cmMakefile.cxx | 8 ++-- Source/cmMakefileExecutableTargetGenerator.cxx | 6 +-- Source/cmMakefileLibraryTargetGenerator.cxx | 8 ++-- Source/cmMakefileTargetGenerator.cxx | 16 ++++---- Source/cmNinjaTargetGenerator.cxx | 3 +- Source/cmOutputRequiredFilesCommand.cxx | 2 +- Source/cmQtAutoGenerators.cxx | 4 +- Source/cmTarget.cxx | 8 ++-- Source/cmTargetIncludeDirectoriesCommand.cxx | 3 +- Source/cmVisualStudio10TargetGenerator.cxx | 10 ++--- Source/cmake.cxx | 4 +- 39 files changed, 146 insertions(+), 142 deletions(-) diff --git a/Source/cmCPluginAPI.cxx b/Source/cmCPluginAPI.cxx index 4f1fa3c..c55ea35 100644 --- a/Source/cmCPluginAPI.cxx +++ b/Source/cmCPluginAPI.cxx @@ -131,12 +131,12 @@ const char* CCONV cmGetHomeOutputDirectory(void *arg) const char* CCONV cmGetStartDirectory(void *arg) { cmMakefile *mf = static_cast(arg); - return mf->GetStartDirectory(); + return mf->GetCurrentSourceDirectory(); } const char* CCONV cmGetStartOutputDirectory(void *arg) { cmMakefile *mf = static_cast(arg); - return mf->GetStartOutputDirectory(); + return mf->GetCurrentBinaryDirectory(); } const char* CCONV cmGetCurrentDirectory(void *arg) { diff --git a/Source/cmExtraCodeBlocksGenerator.cxx b/Source/cmExtraCodeBlocksGenerator.cxx index dfa2cb1..e374387 100644 --- a/Source/cmExtraCodeBlocksGenerator.cxx +++ b/Source/cmExtraCodeBlocksGenerator.cxx @@ -77,7 +77,7 @@ void cmExtraCodeBlocksGenerator::CreateProjectFile( const std::vector& lgs) { const cmMakefile* mf=lgs[0]->GetMakefile(); - std::string outputDir=mf->GetStartOutputDirectory(); + std::string outputDir=mf->GetCurrentBinaryDirectory(); std::string projectName=mf->GetProjectName(); std::string filename=outputDir+"/"; @@ -331,7 +331,7 @@ void cmExtraCodeBlocksGenerator { // Only add the global targets from CMAKE_BINARY_DIR, // not from the subdirs - if (strcmp(makefile->GetStartOutputDirectory(), + if (strcmp(makefile->GetCurrentBinaryDirectory(), makefile->GetHomeOutputDirectory())==0) { this->AppendTarget(fout, ti->first, 0, @@ -550,14 +550,14 @@ void cmExtraCodeBlocksGenerator::AppendTarget(cmGeneratedFileStream& fout, const cmMakefile* makefile, const char* compiler) { - std::string makefileName = makefile->GetStartOutputDirectory(); + std::string makefileName = makefile->GetCurrentBinaryDirectory(); makefileName += "/Makefile"; fout<<" \n"; if (target!=0) { int cbTargetType = this->GetCBTargetType(target); - std::string workingDir = makefile->GetStartOutputDirectory(); + std::string workingDir = makefile->GetCurrentBinaryDirectory(); if ( target->GetType()==cmTarget::EXECUTABLE) { // Determine the directory where the executable target is created, and @@ -653,7 +653,7 @@ void cmExtraCodeBlocksGenerator::AppendTarget(cmGeneratedFileStream& fout, else // e.g. all and the GLOBAL and UTILITY targets { fout<<"