diff --git a/Source/CTest/cmCTestScriptHandler.cxx b/Source/CTest/cmCTestScriptHandler.cxx index d1e7e3a62..0a34be88e 100644 --- a/Source/CTest/cmCTestScriptHandler.cxx +++ b/Source/CTest/cmCTestScriptHandler.cxx @@ -346,10 +346,10 @@ 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); + this->Makefile->SetCurrentSourceDirectory(cwd); + this->Makefile->SetCurrentBinaryDirectory(cwd); // remove all cmake commands which are not scriptable, since they can't be // used in ctest scripts diff --git a/Source/QtDialog/QCMake.cxx b/Source/QtDialog/QCMake.cxx index 652435052..9edbb201b 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/cmAddCustomCommandCommand.cxx b/Source/cmAddCustomCommandCommand.cxx index 8fb49ca23..ba9e663ca 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 a0e20c8f2..c246aee58 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 9d55c1a6d..69c6a14d4 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,8 +93,8 @@ bool cmAddSubDirectoryCommand::InitialPass // Remove the CurrentDirectory from the srcPath and replace it // with the CurrentOutputDirectory. - const char* src = this->Makefile->GetCurrentDirectory(); - const char* bin = this->Makefile->GetCurrentOutputDirectory(); + const char* src = this->Makefile->GetCurrentSourceDirectory(); + 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/cmAuxSourceDirectoryCommand.cxx b/Source/cmAuxSourceDirectoryCommand.cxx index b8238f850..5f5017d99 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 77cd6c687..c55ea3597 100644 --- a/Source/cmCPluginAPI.cxx +++ b/Source/cmCPluginAPI.cxx @@ -131,22 +131,22 @@ 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) { cmMakefile *mf = static_cast(arg); - return mf->GetCurrentDirectory(); + return mf->GetCurrentSourceDirectory(); } 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 687638863..46b71c59b 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; @@ -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 f93d3df7e..54c27d6ce 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 d9818cede..f12116eba 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 76283d462..06541c001 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 554b68650..e374387de 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, @@ -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 += "/"; @@ -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<<"