cmMakefile: Rename GetCurrent{Output,Binary}Directory.

Match names used in CMake code.
This commit is contained in:
Stephen Kelly 2015-04-16 21:33:09 +02:00
parent 55d80d0a85
commit 54d6a9187f
39 changed files with 73 additions and 73 deletions

View File

@ -168,7 +168,7 @@ bool cmAddCustomCommandCommand
// and later references "${CMAKE_CURRENT_SOURCE_DIR}/out.txt". // and later references "${CMAKE_CURRENT_SOURCE_DIR}/out.txt".
// This is fairly obscure so we can wait for someone to // This is fairly obscure so we can wait for someone to
// complain. // complain.
filename = this->Makefile->GetCurrentOutputDirectory(); filename = this->Makefile->GetCurrentBinaryDirectory();
filename += "/"; filename += "/";
} }
filename += copy; filename += copy;
@ -315,7 +315,7 @@ bool cmAddCustomCommandCommand
// Convert working directory to a full path. // Convert working directory to a full path.
if(!working.empty()) if(!working.empty())
{ {
const char* build_dir = this->Makefile->GetCurrentOutputDirectory(); const char* build_dir = this->Makefile->GetCurrentBinaryDirectory();
working = cmSystemTools::CollapseFullPath(working, build_dir); working = cmSystemTools::CollapseFullPath(working, build_dir);
} }

View File

@ -138,7 +138,7 @@ bool cmAddCustomTargetCommand
std::string filename; std::string filename;
if (!cmSystemTools::FileIsFullPath(copy.c_str())) if (!cmSystemTools::FileIsFullPath(copy.c_str()))
{ {
filename = this->Makefile->GetCurrentOutputDirectory(); filename = this->Makefile->GetCurrentBinaryDirectory();
filename += "/"; filename += "/";
} }
filename += copy; filename += copy;
@ -240,7 +240,7 @@ bool cmAddCustomTargetCommand
// Convert working directory to a full path. // Convert working directory to a full path.
if(!working_directory.empty()) if(!working_directory.empty())
{ {
const char* build_dir = this->Makefile->GetCurrentOutputDirectory(); const char* build_dir = this->Makefile->GetCurrentBinaryDirectory();
working_directory = working_directory =
cmSystemTools::CollapseFullPath(working_directory, build_dir); cmSystemTools::CollapseFullPath(working_directory, build_dir);
} }

View File

@ -94,7 +94,7 @@ bool cmAddSubDirectoryCommand::InitialPass
// Remove the CurrentDirectory from the srcPath and replace it // Remove the CurrentDirectory from the srcPath and replace it
// with the CurrentOutputDirectory. // with the CurrentOutputDirectory.
const char* src = this->Makefile->GetCurrentSourceDirectory(); 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 srcLen = strlen(src);
size_t binLen = strlen(bin); size_t binLen = strlen(bin);
if(srcLen > 0 && src[srcLen-1] == '/') if(srcLen > 0 && src[srcLen-1] == '/')
@ -113,7 +113,7 @@ bool cmAddSubDirectoryCommand::InitialPass
} }
else else
{ {
binPath = this->Makefile->GetCurrentOutputDirectory(); binPath = this->Makefile->GetCurrentBinaryDirectory();
binPath += "/"; binPath += "/";
binPath += binArg; binPath += binArg;
} }

View File

@ -146,7 +146,7 @@ const char* CCONV cmGetCurrentDirectory(void *arg)
const char* CCONV cmGetCurrentOutputDirectory(void *arg) const char* CCONV cmGetCurrentOutputDirectory(void *arg)
{ {
cmMakefile *mf = static_cast<cmMakefile *>(arg); cmMakefile *mf = static_cast<cmMakefile *>(arg);
return mf->GetCurrentOutputDirectory(); return mf->GetCurrentBinaryDirectory();
} }
const char* CCONV cmGetDefinition(void *arg,const char*def) const char* CCONV cmGetDefinition(void *arg,const char*def)
{ {

View File

@ -45,7 +45,7 @@ bool cmConfigureFileCommand
const char* outFile = args[1].c_str(); const char* outFile = args[1].c_str();
if(!cmSystemTools::FileIsFullPath(outFile)) if(!cmSystemTools::FileIsFullPath(outFile))
{ {
this->OutputFile = this->Makefile->GetCurrentOutputDirectory(); this->OutputFile = this->Makefile->GetCurrentBinaryDirectory();
this->OutputFile += "/"; this->OutputFile += "/";
} }
this->OutputFile += outFile; this->OutputFile += outFile;

View File

@ -73,7 +73,7 @@ bool cmCreateTestSourceList
"You must specify a file extension for the test driver file."); "You must specify a file extension for the test driver file.");
return false; return false;
} }
std::string driver = this->Makefile->GetCurrentOutputDirectory(); std::string driver = this->Makefile->GetCurrentBinaryDirectory();
driver += "/"; driver += "/";
driver += *i; driver += *i;
++i; ++i;

View File

@ -237,7 +237,7 @@ bool cmDependsFortran::Finalize(std::ostream& makeDepends,
else else
{ {
mod_dir = mod_dir =
this->LocalGenerator->GetMakefile()->GetCurrentOutputDirectory(); this->LocalGenerator->GetMakefile()->GetCurrentBinaryDirectory();
} }
// Actually write dependencies to the streams. // Actually write dependencies to the streams.

View File

@ -113,7 +113,7 @@ bool cmExportCommand
else else
{ {
// Interpret relative paths with respect to the current build dir. // 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; fname = dir + "/" + fname;
} }
@ -295,7 +295,7 @@ bool cmExportCommand::HandlePackage(std::vector<std::string> const& args)
// We store the current build directory in the registry as a value // 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 // named by a hash of its own content. This is deterministic and is
// unique with high probability. // unique with high probability.
const char* outDir = this->Makefile->GetCurrentOutputDirectory(); const char* outDir = this->Makefile->GetCurrentBinaryDirectory();
std::string hash = cmSystemTools::ComputeStringMD5(outDir); std::string hash = cmSystemTools::ComputeStringMD5(outDir);
#if defined(_WIN32) && !defined(__CYGWIN__) #if defined(_WIN32) && !defined(__CYGWIN__)
this->StorePackageRegistryWin(package, outDir, hash.c_str()); this->StorePackageRegistryWin(package, outDir, hash.c_str());

View File

@ -524,7 +524,7 @@ std::string cmExtraCodeBlocksGenerator::CreateDummyTargetFile(
// this file doesn't seem to be used by C::B in custom makefile mode, // 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 // 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. // 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 += "/";
filename += mf->GetLocalGenerator()->GetTargetDirectory(*target); filename += mf->GetLocalGenerator()->GetTargetDirectory(*target);
filename += "/"; filename += "/";

View File

@ -1033,7 +1033,7 @@ void cmExtraEclipseCDT4Generator::CreateCProjectFile() const
{ {
const cmTargets& targets = (*it)->GetMakefile()->GetTargets(); const cmTargets& targets = (*it)->GetMakefile()->GetTargets();
cmMakefile* makefile=(*it)->GetMakefile(); cmMakefile* makefile=(*it)->GetMakefile();
std::string subdir = (*it)->Convert(makefile->GetCurrentOutputDirectory(), std::string subdir = (*it)->Convert(makefile->GetCurrentBinaryDirectory(),
cmLocalGenerator::HOME_OUTPUT); cmLocalGenerator::HOME_OUTPUT);
if (subdir == ".") if (subdir == ".")
{ {
@ -1094,7 +1094,7 @@ void cmExtraEclipseCDT4Generator::CreateCProjectFile() const
ti->first.c_str()); ti->first.c_str());
std::string cleanArgs = "-E chdir \""; std::string cleanArgs = "-E chdir \"";
cleanArgs += makefile->GetCurrentOutputDirectory(); cleanArgs += makefile->GetCurrentBinaryDirectory();
cleanArgs += "\" \""; cleanArgs += "\" \"";
cleanArgs += cmake; cleanArgs += cmake;
cleanArgs += "\" -P \""; cleanArgs += "\" -P \"";

View File

@ -123,7 +123,7 @@ cmExtraKateGenerator::WriteTargets(const cmMakefile* mf,
{ {
const cmTargets& targets = (*it)->GetMakefile()->GetTargets(); const cmTargets& targets = (*it)->GetMakefile()->GetTargets();
cmMakefile* makefile=(*it)->GetMakefile(); cmMakefile* makefile=(*it)->GetMakefile();
std::string currentDir = makefile->GetCurrentOutputDirectory(); std::string currentDir = makefile->GetCurrentBinaryDirectory();
bool topLevel = (currentDir == makefile->GetHomeOutputDirectory()); bool topLevel = (currentDir == makefile->GetHomeOutputDirectory());
for(cmTargets::const_iterator ti=targets.begin(); ti!=targets.end(); ++ti) for(cmTargets::const_iterator ti=targets.begin(); ti!=targets.end(); ++ti)

View File

@ -32,7 +32,7 @@ bool cmFLTKWrapUICommand
this->Target = args[0]; // Target that will use the generated files 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 // 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" // Some of the generated files are *.h so the directory "GUI"

View File

@ -645,7 +645,7 @@ bool cmFileCommand::HandleStringsCommand(std::vector<std::string> const& args)
if (hex_conversion_enabled) if (hex_conversion_enabled)
{ {
// TODO: should work without temp file, but just on a memory buffer // 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 += cmake::GetCMakeFilesDirectory();
binaryFileName += "/FileCommandStringsBinaryFile"; binaryFileName += "/FileCommandStringsBinaryFile";
if(cmHexFileConverter::TryConvert(fileName.c_str(),binaryFileName.c_str())) if(cmHexFileConverter::TryConvert(fileName.c_str(),binaryFileName.c_str()))
@ -1568,7 +1568,7 @@ bool cmFileCopier::CheckValue(std::string const& arg)
} }
else else
{ {
this->Destination = this->Makefile->GetCurrentOutputDirectory(); this->Destination = this->Makefile->GetCurrentBinaryDirectory();
this->Destination += "/" + arg; this->Destination += "/" + arg;
} }
this->Doing = DoingNone; this->Doing = DoingNone;

View File

@ -679,7 +679,7 @@ void cmGlobalNinjaGenerator
// Compute full path to object file directory for this target. // Compute full path to object file directory for this target.
std::string dir; std::string dir;
dir += gt->Makefile->GetCurrentOutputDirectory(); dir += gt->Makefile->GetCurrentBinaryDirectory();
dir += "/"; dir += "/";
dir += gt->LocalGenerator->GetTargetDirectory(*target); dir += gt->LocalGenerator->GetTargetDirectory(*target);
dir += "/"; dir += "/";

View File

@ -113,7 +113,7 @@ cmGlobalUnixMakefileGenerator3
// Compute full path to object file directory for this target. // Compute full path to object file directory for this target.
std::string dir; std::string dir;
dir += gt->Makefile->GetCurrentOutputDirectory(); dir += gt->Makefile->GetCurrentBinaryDirectory();
dir += "/"; dir += "/";
dir += gt->LocalGenerator->GetTargetDirectory(*target); dir += gt->LocalGenerator->GetTargetDirectory(*target);
dir += "/"; dir += "/";

View File

@ -338,7 +338,7 @@ void cmGlobalVisualStudio10Generator::Generate()
" " << this->LongestSource.SourceFile->GetFullPath() << "\n" " " << this->LongestSource.SourceFile->GetFullPath() << "\n"
"This is because some Visual Studio tools would append the relative " "This is because some Visual Studio tools would append the relative "
"path to the end of the referencing directory path, as in:\n" "path to the end of the referencing directory path, as in:\n"
" " << mf->GetCurrentOutputDirectory() << "/" " " << mf->GetCurrentBinaryDirectory() << "/"
<< this->LongestSource.SourceRel << "\n" << this->LongestSource.SourceRel << "\n"
"and then incorrectly complain that the file does not exist because " "and then incorrectly complain that the file does not exist because "
"the path length is too long for some internal buffer or API. " "the path length is too long for some internal buffer or API. "
@ -585,7 +585,7 @@ cmGlobalVisualStudio10Generator
void cmGlobalVisualStudio10Generator::PathTooLong( void cmGlobalVisualStudio10Generator::PathTooLong(
cmTarget* target, cmSourceFile const* sf, std::string const& sfRel) 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()); 1 + sfRel.length());
if(len > this->LongestSource.Length) if(len > this->LongestSource.Length)
{ {

View File

@ -281,7 +281,7 @@ bool cmGlobalVisualStudio8Generator::AddCheckTarget()
stampList += "generate.stamp.list"; stampList += "generate.stamp.list";
{ {
std::string stampListFile = std::string stampListFile =
generators[0]->GetMakefile()->GetCurrentOutputDirectory(); generators[0]->GetMakefile()->GetCurrentBinaryDirectory();
stampListFile += "/"; stampListFile += "/";
stampListFile += stampList; stampListFile += stampList;
std::string stampFile; std::string stampFile;
@ -289,7 +289,7 @@ bool cmGlobalVisualStudio8Generator::AddCheckTarget()
for(std::vector<cmLocalGenerator*>::const_iterator for(std::vector<cmLocalGenerator*>::const_iterator
gi = generators.begin(); gi != generators.end(); ++gi) gi = generators.begin(); gi != generators.end(); ++gi)
{ {
stampFile = (*gi)->GetMakefile()->GetCurrentOutputDirectory(); stampFile = (*gi)->GetMakefile()->GetCurrentBinaryDirectory();
stampFile += "/"; stampFile += "/";
stampFile += cmake::GetCMakeFilesDirectoryPostSlash(); stampFile += cmake::GetCMakeFilesDirectoryPostSlash();
stampFile += "generate.stamp"; stampFile += "generate.stamp";

View File

@ -121,7 +121,7 @@ void cmGlobalVisualStudioGenerator::Generate()
void cmGlobalVisualStudioGenerator void cmGlobalVisualStudioGenerator
::ComputeTargetObjectDirectory(cmGeneratorTarget* gt) const ::ComputeTargetObjectDirectory(cmGeneratorTarget* gt) const
{ {
std::string dir = gt->Makefile->GetCurrentOutputDirectory(); std::string dir = gt->Makefile->GetCurrentBinaryDirectory();
dir += "/"; dir += "/";
std::string tgtDir = gt->LocalGenerator->GetTargetDirectory(*gt->Target); std::string tgtDir = gt->LocalGenerator->GetTargetDirectory(*gt->Target);
if(!tgtDir.empty()) if(!tgtDir.empty())

View File

@ -409,11 +409,11 @@ void cmGlobalXCodeGenerator::SetGenerationRoot(cmLocalGenerator* root)
this->SetCurrentLocalGenerator(root); this->SetCurrentLocalGenerator(root);
cmSystemTools::SplitPath(this->CurrentMakefile->GetCurrentSourceDirectory(), cmSystemTools::SplitPath(this->CurrentMakefile->GetCurrentSourceDirectory(),
this->ProjectSourceDirectoryComponents); this->ProjectSourceDirectoryComponents);
cmSystemTools::SplitPath(this->CurrentMakefile->GetCurrentOutputDirectory(), cmSystemTools::SplitPath(this->CurrentMakefile->GetCurrentBinaryDirectory(),
this->ProjectOutputDirectoryComponents); this->ProjectOutputDirectoryComponents);
this->CurrentXCodeHackMakefile = this->CurrentXCodeHackMakefile =
root->GetMakefile()->GetCurrentOutputDirectory(); root->GetMakefile()->GetCurrentBinaryDirectory();
this->CurrentXCodeHackMakefile += "/CMakeScripts"; this->CurrentXCodeHackMakefile += "/CMakeScripts";
cmSystemTools::MakeDirectory(this->CurrentXCodeHackMakefile.c_str()); cmSystemTools::MakeDirectory(this->CurrentXCodeHackMakefile.c_str());
this->CurrentXCodeHackMakefile += "/XCODE_DEPEND_HELPER.make"; this->CurrentXCodeHackMakefile += "/XCODE_DEPEND_HELPER.make";
@ -459,7 +459,7 @@ cmGlobalXCodeGenerator::AddExtraTargets(cmLocalGenerator* root,
allbuild->AddSourceCMP0049(listfile.c_str()); allbuild->AddSourceCMP0049(listfile.c_str());
// Add XCODE depend helper // Add XCODE depend helper
std::string dir = mf->GetCurrentOutputDirectory(); std::string dir = mf->GetCurrentBinaryDirectory();
cmCustomCommandLine makeHelper; cmCustomCommandLine makeHelper;
if(this->XcodeVersion < 50) if(this->XcodeVersion < 50)
{ {
@ -1012,7 +1012,7 @@ void cmGlobalXCodeGenerator::SetCurrentLocalGenerator(cmLocalGenerator* gen)
this->CurrentMakefile = gen->GetMakefile(); this->CurrentMakefile = gen->GetMakefile();
std::string outdir = std::string outdir =
cmSystemTools::CollapseFullPath(this->CurrentMakefile-> cmSystemTools::CollapseFullPath(this->CurrentMakefile->
GetCurrentOutputDirectory()); GetCurrentBinaryDirectory());
cmSystemTools::SplitPath(outdir.c_str(), cmSystemTools::SplitPath(outdir.c_str(),
this->CurrentOutputDirectoryComponents); this->CurrentOutputDirectoryComponents);
@ -1366,7 +1366,7 @@ void cmGlobalXCodeGenerator::ForceLinkerLanguage(cmTarget& cmtarget)
// linker language. This should convince Xcode to choose the proper // linker language. This should convince Xcode to choose the proper
// language. // language.
cmMakefile* mf = cmtarget.GetMakefile(); cmMakefile* mf = cmtarget.GetMakefile();
std::string fname = mf->GetCurrentOutputDirectory(); std::string fname = mf->GetCurrentBinaryDirectory();
fname += cmake::GetCMakeFilesDirectory(); fname += cmake::GetCMakeFilesDirectory();
fname += "/"; fname += "/";
fname += cmtarget.GetName(); fname += cmtarget.GetName();
@ -1594,7 +1594,7 @@ cmGlobalXCodeGenerator::AddCommandsToBuildPhase(cmXCodeObject* buildphase,
const & commands, const & commands,
const char* name) const char* name)
{ {
std::string dir = this->CurrentMakefile->GetCurrentOutputDirectory(); std::string dir = this->CurrentMakefile->GetCurrentBinaryDirectory();
dir += "/CMakeScripts"; dir += "/CMakeScripts";
cmSystemTools::MakeDirectory(dir.c_str()); cmSystemTools::MakeDirectory(dir.c_str());
std::string makefile = dir; std::string makefile = dir;
@ -1615,7 +1615,7 @@ cmGlobalXCodeGenerator::AddCommandsToBuildPhase(cmXCodeObject* buildphase,
currentConfig->c_str()); currentConfig->c_str());
} }
std::string cdir = this->CurrentMakefile->GetCurrentOutputDirectory(); std::string cdir = this->CurrentMakefile->GetCurrentBinaryDirectory();
cdir = this->ConvertToRelativeForXCode(cdir.c_str()); cdir = this->ConvertToRelativeForXCode(cdir.c_str());
std::string makecmd = "make -C "; std::string makecmd = "make -C ";
makecmd += cdir; makecmd += cdir;
@ -1943,7 +1943,7 @@ void cmGlobalXCodeGenerator::CreateBuildSettings(cmTarget& target,
} }
// Set attributes to specify the proper name for the 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 || if(target.GetType() == cmTarget::STATIC_LIBRARY ||
target.GetType() == cmTarget::SHARED_LIBRARY || target.GetType() == cmTarget::SHARED_LIBRARY ||
target.GetType() == cmTarget::MODULE_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"; symroot += "/build";
buildSettings->AddAttribute("SYMROOT", this->CreateString(symroot.c_str())); buildSettings->AddAttribute("SYMROOT", this->CreateString(symroot.c_str()));
@ -3516,7 +3516,7 @@ cmGlobalXCodeGenerator::GetObjectsNormalDirectory(
const cmTarget *t) const const cmTarget *t) const
{ {
std::string dir = std::string dir =
t->GetMakefile()->GetCurrentOutputDirectory(); t->GetMakefile()->GetCurrentBinaryDirectory();
dir += "/"; dir += "/";
dir += projName; dir += projName;
dir += ".build/"; dir += ".build/";
@ -4016,7 +4016,7 @@ void cmGlobalXCodeGenerator::AppendFlag(std::string& flags,
std::string std::string
cmGlobalXCodeGenerator::ComputeInfoPListLocation(cmTarget& target) cmGlobalXCodeGenerator::ComputeInfoPListLocation(cmTarget& target)
{ {
std::string plist = target.GetMakefile()->GetCurrentOutputDirectory(); std::string plist = target.GetMakefile()->GetCurrentBinaryDirectory();
plist += cmake::GetCMakeFilesDirectory(); plist += cmake::GetCMakeFilesDirectory();
plist += "/"; plist += "/";
plist += target.GetName(); plist += target.GetName();

View File

@ -59,7 +59,7 @@ void cmInstallExportGenerator::ComputeTempDir()
{ {
// Choose a temporary directory in which to generate the import // Choose a temporary directory in which to generate the import
// files to be installed. // files to be installed.
this->TempDir = this->Makefile->GetCurrentOutputDirectory(); this->TempDir = this->Makefile->GetCurrentBinaryDirectory();
this->TempDir += cmake::GetCMakeFilesDirectory(); this->TempDir += cmake::GetCMakeFilesDirectory();
this->TempDir += "/Export"; this->TempDir += "/Export";
if(this->Destination.empty()) if(this->Destination.empty())

View File

@ -152,7 +152,7 @@ std::string cmInstallFilesCommand::FindInstallSource(const char* name) const
} }
// This is a relative path. // This is a relative path.
std::string tb = this->Makefile->GetCurrentOutputDirectory(); std::string tb = this->Makefile->GetCurrentBinaryDirectory();
tb += "/"; tb += "/";
tb += name; tb += name;
std::string ts = this->Makefile->GetCurrentSourceDirectory(); std::string ts = this->Makefile->GetCurrentSourceDirectory();

View File

@ -115,7 +115,7 @@ std::string cmInstallProgramsCommand
} }
// This is a relative path. // This is a relative path.
std::string tb = this->Makefile->GetCurrentOutputDirectory(); std::string tb = this->Makefile->GetCurrentBinaryDirectory();
tb += "/"; tb += "/";
tb += name; tb += name;
std::string ts = this->Makefile->GetCurrentSourceDirectory(); std::string ts = this->Makefile->GetCurrentSourceDirectory();

View File

@ -423,7 +423,7 @@ void cmLocalGenerator::GenerateInstallRules()
// Create the install script file. // Create the install script file.
std::string file = this->Makefile->GetStartOutputDirectory(); std::string file = this->Makefile->GetStartOutputDirectory();
std::string homedir = this->Makefile->GetHomeOutputDirectory(); std::string homedir = this->Makefile->GetHomeOutputDirectory();
std::string currdir = this->Makefile->GetCurrentOutputDirectory(); std::string currdir = this->Makefile->GetCurrentBinaryDirectory();
cmSystemTools::ConvertToUnixSlashes(file); cmSystemTools::ConvertToUnixSlashes(file);
cmSystemTools::ConvertToUnixSlashes(homedir); cmSystemTools::ConvertToUnixSlashes(homedir);
cmSystemTools::ConvertToUnixSlashes(currdir); cmSystemTools::ConvertToUnixSlashes(currdir);
@ -669,12 +669,12 @@ void cmLocalGenerator::AddBuildTargetRule(const std::string& llang,
!sf->GetPropertyAsBool("EXTERNAL_OBJECT")) !sf->GetPropertyAsBool("EXTERNAL_OBJECT"))
{ {
std::string dir_max; std::string dir_max;
dir_max += this->Makefile->GetCurrentOutputDirectory(); dir_max += this->Makefile->GetCurrentBinaryDirectory();
dir_max += "/"; dir_max += "/";
std::string obj = this->GetObjectFileNameWithoutTarget(*sf, dir_max); std::string obj = this->GetObjectFileNameWithoutTarget(*sf, dir_max);
if(!obj.empty()) if(!obj.empty())
{ {
std::string ofname = this->Makefile->GetCurrentOutputDirectory(); std::string ofname = this->Makefile->GetCurrentBinaryDirectory();
ofname += "/"; ofname += "/";
ofname += obj; ofname += obj;
objVector.push_back(ofname); objVector.push_back(ofname);

View File

@ -205,7 +205,7 @@ GetLocalObjectFiles(std::map<std::string, LocalObjectInfo> &localObjectFiles)
->GetSafeDefinition("CMAKE_BUILD_TYPE")); ->GetSafeDefinition("CMAKE_BUILD_TYPE"));
// Compute full path to object file directory for this target. // Compute full path to object file directory for this target.
std::string dir; std::string dir;
dir += gt->Makefile->GetCurrentOutputDirectory(); dir += gt->Makefile->GetCurrentBinaryDirectory();
dir += "/"; dir += "/";
dir += this->GetTargetDirectory(*gt->Target); dir += this->GetTargetDirectory(*gt->Target);
dir += "/"; dir += "/";
@ -1236,7 +1236,7 @@ cmLocalUnixMakefileGenerator3
const std::vector<std::string>& files, const std::vector<std::string>& files,
cmTarget& target, const char* filename) cmTarget& target, const char* filename)
{ {
std::string cleanfile = this->Makefile->GetCurrentOutputDirectory(); std::string cleanfile = this->Makefile->GetCurrentBinaryDirectory();
cleanfile += "/"; cleanfile += "/";
cleanfile += this->GetTargetDirectory(target); cleanfile += this->GetTargetDirectory(target);
cleanfile += "/cmake_clean"; cleanfile += "/cmake_clean";

View File

@ -1968,7 +1968,7 @@ cmLocalVisualStudio6Generator
// files directory for any configuration. This is used to construct // files directory for any configuration. This is used to construct
// object file names that do not produce paths that are too long. // object file names that do not produce paths that are too long.
std::string dir_max; std::string dir_max;
dir_max += this->Makefile->GetCurrentOutputDirectory(); dir_max += this->Makefile->GetCurrentBinaryDirectory();
dir_max += "/"; dir_max += "/";
dir_max += config_max; dir_max += config_max;
dir_max += "/"; dir_max += "/";

View File

@ -286,7 +286,7 @@ void cmLocalVisualStudio7Generator
//---------------------------------------------------------------------------- //----------------------------------------------------------------------------
cmSourceFile* cmLocalVisualStudio7Generator::CreateVCProjBuildRule() cmSourceFile* cmLocalVisualStudio7Generator::CreateVCProjBuildRule()
{ {
std::string stampName = this->Makefile->GetCurrentOutputDirectory(); std::string stampName = this->Makefile->GetCurrentBinaryDirectory();
stampName += "/"; stampName += "/";
stampName += cmake::GetCMakeFilesDirectoryPostSlash(); stampName += cmake::GetCMakeFilesDirectoryPostSlash();
stampName += "generate.stamp"; stampName += "generate.stamp";
@ -1707,7 +1707,7 @@ cmLocalVisualStudio7Generator
// files directory for any configuration. This is used to construct // files directory for any configuration. This is used to construct
// object file names that do not produce paths that are too long. // object file names that do not produce paths that are too long.
std::string dir_max; std::string dir_max;
dir_max += this->Makefile->GetCurrentOutputDirectory(); dir_max += this->Makefile->GetCurrentBinaryDirectory();
dir_max += "/"; dir_max += "/";
dir_max += this->GetTargetDirectory(target); dir_max += this->GetTargetDirectory(target);
dir_max += "/"; dir_max += "/";

View File

@ -488,7 +488,7 @@ public:
{ {
return this->cmStartDirectory.c_str(); return this->cmStartDirectory.c_str();
} }
const char* GetCurrentOutputDirectory() const const char* GetCurrentBinaryDirectory() const
{ {
return this->StartOutputDirectory.c_str(); return this->StartOutputDirectory.c_str();
} }

View File

@ -495,7 +495,7 @@ void cmMakefileTargetGenerator
this->WriteObjectBuildFile(obj, lang, source, depends); this->WriteObjectBuildFile(obj, lang, source, depends);
// The object file should be checked for dependency integrity. // The object file should be checked for dependency integrity.
std::string objFullPath = this->Makefile->GetCurrentOutputDirectory(); std::string objFullPath = this->Makefile->GetCurrentBinaryDirectory();
objFullPath += "/"; objFullPath += "/";
objFullPath += obj; objFullPath += obj;
objFullPath = objFullPath =
@ -1968,7 +1968,7 @@ const char* cmMakefileTargetGenerator::GetFortranModuleDirectory()
{ {
// Interpret relative to the current output directory. // Interpret relative to the current output directory.
this->FortranModuleDirectory = this->FortranModuleDirectory =
this->Makefile->GetCurrentOutputDirectory(); this->Makefile->GetCurrentBinaryDirectory();
this->FortranModuleDirectory += "/"; this->FortranModuleDirectory += "/";
this->FortranModuleDirectory += target_mod_dir; this->FortranModuleDirectory += target_mod_dir;
} }

View File

@ -29,7 +29,7 @@ bool cmProjectCommand
this->Makefile->AddCacheDefinition this->Makefile->AddCacheDefinition
(bindir, (bindir,
this->Makefile->GetCurrentOutputDirectory(), this->Makefile->GetCurrentBinaryDirectory(),
"Value Computed by CMake", cmState::STATIC); "Value Computed by CMake", cmState::STATIC);
this->Makefile->AddCacheDefinition this->Makefile->AddCacheDefinition
(srcdir, (srcdir,
@ -40,7 +40,7 @@ bool cmProjectCommand
srcdir = "PROJECT_SOURCE_DIR"; srcdir = "PROJECT_SOURCE_DIR";
this->Makefile->AddDefinition(bindir, this->Makefile->AddDefinition(bindir,
this->Makefile->GetCurrentOutputDirectory()); this->Makefile->GetCurrentBinaryDirectory());
this->Makefile->AddDefinition(srcdir, this->Makefile->AddDefinition(srcdir,
this->Makefile->GetCurrentSourceDirectory()); this->Makefile->GetCurrentSourceDirectory());

View File

@ -41,7 +41,7 @@ bool cmQTWrapCPPCommand::InitialPass(std::vector<std::string> const& args,
// Compute the name of the file to generate. // Compute the name of the file to generate.
std::string srcName = std::string srcName =
cmSystemTools::GetFilenameWithoutLastExtension(*j); cmSystemTools::GetFilenameWithoutLastExtension(*j);
std::string newName = this->Makefile->GetCurrentOutputDirectory(); std::string newName = this->Makefile->GetCurrentBinaryDirectory();
newName += "/moc_"; newName += "/moc_";
newName += srcName; newName += srcName;
newName += ".cxx"; newName += ".cxx";
@ -62,7 +62,7 @@ bool cmQTWrapCPPCommand::InitialPass(std::vector<std::string> const& args,
{ {
if(curr && curr->GetPropertyAsBool("GENERATED")) if(curr && curr->GetPropertyAsBool("GENERATED"))
{ {
hname = this->Makefile->GetCurrentOutputDirectory(); hname = this->Makefile->GetCurrentBinaryDirectory();
} }
else else
{ {

View File

@ -46,15 +46,15 @@ bool cmQTWrapUICommand::InitialPass(std::vector<std::string> const& args,
// Compute the name of the files to generate. // Compute the name of the files to generate.
std::string srcName = std::string srcName =
cmSystemTools::GetFilenameWithoutLastExtension(*j); cmSystemTools::GetFilenameWithoutLastExtension(*j);
std::string hName = this->Makefile->GetCurrentOutputDirectory(); std::string hName = this->Makefile->GetCurrentBinaryDirectory();
hName += "/"; hName += "/";
hName += srcName; hName += srcName;
hName += ".h"; hName += ".h";
std::string cxxName = this->Makefile->GetCurrentOutputDirectory(); std::string cxxName = this->Makefile->GetCurrentBinaryDirectory();
cxxName += "/"; cxxName += "/";
cxxName += srcName; cxxName += srcName;
cxxName += ".cxx"; cxxName += ".cxx";
std::string mocName = this->Makefile->GetCurrentOutputDirectory(); std::string mocName = this->Makefile->GetCurrentBinaryDirectory();
mocName += "/moc_"; mocName += "/moc_";
mocName += srcName; mocName += srcName;
mocName += ".cxx"; mocName += ".cxx";
@ -69,7 +69,7 @@ bool cmQTWrapUICommand::InitialPass(std::vector<std::string> const& args,
{ {
if(curr && curr->GetPropertyAsBool("GENERATED")) if(curr && curr->GetPropertyAsBool("GENERATED"))
{ {
uiName = this->Makefile->GetCurrentOutputDirectory(); uiName = this->Makefile->GetCurrentBinaryDirectory();
} }
else else
{ {

View File

@ -162,7 +162,7 @@ static std::string getAutogenTargetName(cmTarget const* target)
static std::string getAutogenTargetDir(cmTarget const* target) static std::string getAutogenTargetDir(cmTarget const* target)
{ {
cmMakefile* makefile = target->GetMakefile(); cmMakefile* makefile = target->GetMakefile();
std::string targetDir = makefile->GetCurrentOutputDirectory(); std::string targetDir = makefile->GetCurrentBinaryDirectory();
targetDir += makefile->GetCMakeInstance()->GetCMakeFilesDirectory(); targetDir += makefile->GetCMakeInstance()->GetCMakeFilesDirectory();
targetDir += "/"; targetDir += "/";
targetDir += getAutogenTargetName(target); targetDir += getAutogenTargetName(target);
@ -291,7 +291,7 @@ bool cmQtAutoGenerators::InitializeAutogenTarget(cmTarget* target)
if (target->GetPropertyAsBool("AUTOMOC")) if (target->GetPropertyAsBool("AUTOMOC"))
{ {
std::string automocTargetName = getAutogenTargetName(target); std::string automocTargetName = getAutogenTargetName(target);
std::string mocCppFile = makefile->GetCurrentOutputDirectory(); std::string mocCppFile = makefile->GetCurrentBinaryDirectory();
mocCppFile += "/"; mocCppFile += "/";
mocCppFile += automocTargetName; mocCppFile += automocTargetName;
mocCppFile += ".cpp"; mocCppFile += ".cpp";
@ -317,7 +317,7 @@ bool cmQtAutoGenerators::InitializeAutogenTarget(cmTarget* target)
commandLines.push_back(currentLine); commandLines.push_back(currentLine);
std::string workingDirectory = cmSystemTools::CollapseFullPath( std::string workingDirectory = cmSystemTools::CollapseFullPath(
"", makefile->GetCurrentOutputDirectory()); "", makefile->GetCurrentBinaryDirectory());
std::vector<std::string> depends; std::vector<std::string> depends;
if (const char *autogenDepends = if (const char *autogenDepends =

View File

@ -163,7 +163,7 @@ bool cmSourceFile::FindFullPath(std::string* error)
if(this->Location.DirectoryIsAmbiguous()) if(this->Location.DirectoryIsAmbiguous())
{ {
tryDirs[0] = mf->GetCurrentSourceDirectory(); tryDirs[0] = mf->GetCurrentSourceDirectory();
tryDirs[1] = mf->GetCurrentOutputDirectory(); tryDirs[1] = mf->GetCurrentBinaryDirectory();
} }
else else
{ {

View File

@ -106,7 +106,7 @@ void cmSourceFileLocation::DirectoryUseBinary()
{ {
this->Directory = this->Directory =
cmSystemTools::CollapseFullPath( cmSystemTools::CollapseFullPath(
this->Directory, this->Makefile->GetCurrentOutputDirectory()); this->Directory, this->Makefile->GetCurrentBinaryDirectory());
this->AmbiguousDirectory = false; this->AmbiguousDirectory = false;
} }
} }
@ -285,7 +285,7 @@ bool cmSourceFileLocation::Matches(cmSourceFileLocation const& loc)
this->Directory, this->Makefile->GetCurrentSourceDirectory()); this->Directory, this->Makefile->GetCurrentSourceDirectory());
std::string const& binDir = std::string const& binDir =
cmSystemTools::CollapseFullPath( cmSystemTools::CollapseFullPath(
this->Directory, this->Makefile->GetCurrentOutputDirectory()); this->Directory, this->Makefile->GetCurrentBinaryDirectory());
if(srcDir != loc.Directory && if(srcDir != loc.Directory &&
binDir != loc.Directory) binDir != loc.Directory)
{ {
@ -300,7 +300,7 @@ bool cmSourceFileLocation::Matches(cmSourceFileLocation const& loc)
loc.Directory, loc.Makefile->GetCurrentSourceDirectory()); loc.Directory, loc.Makefile->GetCurrentSourceDirectory());
std::string const& binDir = std::string const& binDir =
cmSystemTools::CollapseFullPath( cmSystemTools::CollapseFullPath(
loc.Directory, loc.Makefile->GetCurrentOutputDirectory()); loc.Directory, loc.Makefile->GetCurrentBinaryDirectory());
if(srcDir != this->Directory && if(srcDir != this->Directory &&
binDir != this->Directory) binDir != this->Directory)
{ {

View File

@ -44,7 +44,7 @@ bool cmSubdirCommand
if (cmSystemTools::FileIsDirectory(srcPath)) if (cmSystemTools::FileIsDirectory(srcPath))
{ {
std::string binPath = std::string binPath =
std::string(this->Makefile->GetCurrentOutputDirectory()) + std::string(this->Makefile->GetCurrentBinaryDirectory()) +
"/" + i->c_str(); "/" + i->c_str();
this->Makefile->AddSubDirectory(srcPath, binPath, this->Makefile->AddSubDirectory(srcPath, binPath,
excludeFromAll, false); excludeFromAll, false);
@ -55,7 +55,7 @@ bool cmSubdirCommand
// we must compute the binPath from the srcPath, we just take the last // we must compute the binPath from the srcPath, we just take the last
// element from the source path and use that // element from the source path and use that
std::string binPath = std::string binPath =
std::string(this->Makefile->GetCurrentOutputDirectory()) + std::string(this->Makefile->GetCurrentBinaryDirectory()) +
"/" + cmSystemTools::GetFilenameName(*i); "/" + cmSystemTools::GetFilenameName(*i);
this->Makefile->AddSubDirectory(*i, binPath, this->Makefile->AddSubDirectory(*i, binPath,
excludeFromAll, false); excludeFromAll, false);

View File

@ -540,7 +540,7 @@ cmListFileBacktrace const& cmTarget::GetBacktrace() const
//---------------------------------------------------------------------------- //----------------------------------------------------------------------------
std::string cmTarget::GetSupportDirectory() const std::string cmTarget::GetSupportDirectory() const
{ {
std::string dir = this->Makefile->GetCurrentOutputDirectory(); std::string dir = this->Makefile->GetCurrentBinaryDirectory();
dir += cmake::GetCMakeFilesDirectory(); dir += cmake::GetCMakeFilesDirectory();
dir += "/"; dir += "/";
dir += this->Name; dir += this->Name;

View File

@ -93,7 +93,7 @@ bool cmUtilitySourceCommand
// The source exists. // The source exists.
std::string cmakeCFGout = std::string cmakeCFGout =
this->Makefile->GetRequiredDefinition("CMAKE_CFG_INTDIR"); this->Makefile->GetRequiredDefinition("CMAKE_CFG_INTDIR");
std::string utilityDirectory = this->Makefile->GetCurrentOutputDirectory(); std::string utilityDirectory = this->Makefile->GetCurrentBinaryDirectory();
std::string exePath; std::string exePath;
if (this->Makefile->GetDefinition("EXECUTABLE_OUTPUT_PATH")) if (this->Makefile->GetDefinition("EXECUTABLE_OUTPUT_PATH"))
{ {

View File

@ -927,7 +927,7 @@ cmVisualStudio10TargetGenerator::ConvertPath(std::string const& path,
{ {
return forceRelative return forceRelative
? cmSystemTools::RelativePath( ? cmSystemTools::RelativePath(
this->Makefile->GetCurrentOutputDirectory(), path.c_str()) this->Makefile->GetCurrentBinaryDirectory(), path.c_str())
: this->LocalGenerator->Convert(path.c_str(), : this->LocalGenerator->Convert(path.c_str(),
cmLocalGenerator::START_OUTPUT, cmLocalGenerator::START_OUTPUT,
cmLocalGenerator::UNCHANGED, cmLocalGenerator::UNCHANGED,
@ -1430,7 +1430,7 @@ void cmVisualStudio10TargetGenerator::WriteSource(
std::string sourceRel = this->ConvertPath(sf->GetFullPath(), true); std::string sourceRel = this->ConvertPath(sf->GetFullPath(), true);
size_t const maxLen = 250; size_t const maxLen = 250;
if(sf->GetCustomCommand() || if(sf->GetCustomCommand() ||
((strlen(this->Makefile->GetCurrentOutputDirectory()) + 1 + ((strlen(this->Makefile->GetCurrentBinaryDirectory()) + 1 +
sourceRel.length()) <= maxLen)) sourceRel.length()) <= maxLen))
{ {
forceRelative = true; forceRelative = true;

View File

@ -159,7 +159,7 @@ static void cmakemainProgressCallback(const char *m, float prog,
else if ((mf) && (strstr(m, "Generating")==m)) else if ((mf) && (strstr(m, "Generating")==m))
{ {
dir = " "; dir = " ";
dir += mf->GetCurrentOutputDirectory(); dir += mf->GetCurrentBinaryDirectory();
} }
if ((prog < 0) || (!dir.empty())) if ((prog < 0) || (!dir.empty()))