cmMakefile: Port users of GetStart* methods to new names.

This commit is contained in:
Stephen Kelly 2015-04-16 20:06:54 +02:00
parent 54d6a9187f
commit 32b8f03acc
39 changed files with 146 additions and 142 deletions

View File

@ -131,12 +131,12 @@ const char* CCONV cmGetHomeOutputDirectory(void *arg)
const char* CCONV cmGetStartDirectory(void *arg) const char* CCONV cmGetStartDirectory(void *arg)
{ {
cmMakefile *mf = static_cast<cmMakefile *>(arg); cmMakefile *mf = static_cast<cmMakefile *>(arg);
return mf->GetStartDirectory(); return mf->GetCurrentSourceDirectory();
} }
const char* CCONV cmGetStartOutputDirectory(void *arg) const char* CCONV cmGetStartOutputDirectory(void *arg)
{ {
cmMakefile *mf = static_cast<cmMakefile *>(arg); cmMakefile *mf = static_cast<cmMakefile *>(arg);
return mf->GetStartOutputDirectory(); return mf->GetCurrentBinaryDirectory();
} }
const char* CCONV cmGetCurrentDirectory(void *arg) const char* CCONV cmGetCurrentDirectory(void *arg)
{ {

View File

@ -77,7 +77,7 @@ void cmExtraCodeBlocksGenerator::CreateProjectFile(
const std::vector<cmLocalGenerator*>& lgs) const std::vector<cmLocalGenerator*>& lgs)
{ {
const cmMakefile* mf=lgs[0]->GetMakefile(); const cmMakefile* mf=lgs[0]->GetMakefile();
std::string outputDir=mf->GetStartOutputDirectory(); std::string outputDir=mf->GetCurrentBinaryDirectory();
std::string projectName=mf->GetProjectName(); std::string projectName=mf->GetProjectName();
std::string filename=outputDir+"/"; std::string filename=outputDir+"/";
@ -331,7 +331,7 @@ void cmExtraCodeBlocksGenerator
{ {
// Only add the global targets from CMAKE_BINARY_DIR, // Only add the global targets from CMAKE_BINARY_DIR,
// not from the subdirs // not from the subdirs
if (strcmp(makefile->GetStartOutputDirectory(), if (strcmp(makefile->GetCurrentBinaryDirectory(),
makefile->GetHomeOutputDirectory())==0) makefile->GetHomeOutputDirectory())==0)
{ {
this->AppendTarget(fout, ti->first, 0, this->AppendTarget(fout, ti->first, 0,
@ -550,14 +550,14 @@ void cmExtraCodeBlocksGenerator::AppendTarget(cmGeneratedFileStream& fout,
const cmMakefile* makefile, const cmMakefile* makefile,
const char* compiler) const char* compiler)
{ {
std::string makefileName = makefile->GetStartOutputDirectory(); std::string makefileName = makefile->GetCurrentBinaryDirectory();
makefileName += "/Makefile"; makefileName += "/Makefile";
fout<<" <Target title=\"" << targetName << "\">\n"; fout<<" <Target title=\"" << targetName << "\">\n";
if (target!=0) if (target!=0)
{ {
int cbTargetType = this->GetCBTargetType(target); int cbTargetType = this->GetCBTargetType(target);
std::string workingDir = makefile->GetStartOutputDirectory(); std::string workingDir = makefile->GetCurrentBinaryDirectory();
if ( target->GetType()==cmTarget::EXECUTABLE) if ( target->GetType()==cmTarget::EXECUTABLE)
{ {
// Determine the directory where the executable target is created, and // 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 else // e.g. all and the GLOBAL and UTILITY targets
{ {
fout<<" <Option working_dir=\"" fout<<" <Option working_dir=\""
<< makefile->GetStartOutputDirectory() << "\" />\n" << makefile->GetCurrentBinaryDirectory() << "\" />\n"
<<" <Option type=\"" << 4 << "\" />\n"; <<" <Option type=\"" << 4 << "\" />\n";
} }

View File

@ -68,15 +68,15 @@ void cmExtraCodeLiteGenerator::Generate()
const cmMakefile* mf =it->second[0]->GetMakefile(); const cmMakefile* mf =it->second[0]->GetMakefile();
this->ConfigName = GetConfigurationName( mf ); this->ConfigName = GetConfigurationName( mf );
if (strcmp(mf->GetStartOutputDirectory(), if (strcmp(mf->GetCurrentBinaryDirectory(),
mf->GetHomeOutputDirectory()) == 0) mf->GetHomeOutputDirectory()) == 0)
{ {
workspaceOutputDir = mf->GetStartOutputDirectory(); workspaceOutputDir = mf->GetCurrentBinaryDirectory();
workspaceProjectName = mf->GetProjectName(); workspaceProjectName = mf->GetProjectName();
workspaceSourcePath = mf->GetHomeDirectory(); workspaceSourcePath = mf->GetHomeDirectory();
workspaceFileName = workspaceOutputDir+"/"; workspaceFileName = workspaceOutputDir+"/";
workspaceFileName += workspaceProjectName + ".workspace"; workspaceFileName += workspaceProjectName + ".workspace";
this->WorkspacePath = mf->GetStartOutputDirectory();; this->WorkspacePath = mf->GetCurrentBinaryDirectory();;
fout.Open(workspaceFileName.c_str(), false, false); fout.Open(workspaceFileName.c_str(), false, false);
fout << "<?xml version=\"1.0\" encoding=\"utf-8\"?>\n" fout << "<?xml version=\"1.0\" encoding=\"utf-8\"?>\n"
@ -92,7 +92,7 @@ void cmExtraCodeLiteGenerator::Generate()
{ {
// retrive project information // retrive project information
const cmMakefile* mf = it->second[0]->GetMakefile(); const cmMakefile* mf = it->second[0]->GetMakefile();
std::string outputDir = mf->GetStartOutputDirectory(); std::string outputDir = mf->GetCurrentBinaryDirectory();
std::string projectName = mf->GetProjectName(); std::string projectName = mf->GetProjectName();
std::string filename = outputDir + "/" + projectName + ".project"; std::string filename = outputDir + "/" + projectName + ".project";
@ -122,7 +122,7 @@ void cmExtraCodeLiteGenerator::CreateProjectFile(
const std::vector<cmLocalGenerator*>& lgs) const std::vector<cmLocalGenerator*>& lgs)
{ {
const cmMakefile* mf = lgs[0]->GetMakefile(); const cmMakefile* mf = lgs[0]->GetMakefile();
std::string outputDir = mf->GetStartOutputDirectory(); std::string outputDir = mf->GetCurrentBinaryDirectory();
std::string projectName = mf->GetProjectName(); std::string projectName = mf->GetProjectName();
std::string filename = outputDir + "/"; std::string filename = outputDir + "/";

View File

@ -495,7 +495,7 @@ void cmExtraEclipseCDT4Generator::CreateProjectFile()
std::string sourceLinkedResourceName = "[Source directory]"; std::string sourceLinkedResourceName = "[Source directory]";
std::string linkSourceDirectory = this->GetEclipsePath( std::string linkSourceDirectory = this->GetEclipsePath(
mf->GetStartDirectory()); mf->GetCurrentSourceDirectory());
// .project dir can't be subdir of a linked resource dir // .project dir can't be subdir of a linked resource dir
if (!cmSystemTools::IsSubDirectory(this->HomeOutputDirectory, if (!cmSystemTools::IsSubDirectory(this->HomeOutputDirectory,
linkSourceDirectory)) linkSourceDirectory))
@ -633,7 +633,7 @@ void cmExtraEclipseCDT4Generator::CreateLinksToSubprojects(
++it) ++it)
{ {
std::string linkSourceDirectory = this->GetEclipsePath( std::string linkSourceDirectory = this->GetEclipsePath(
it->second[0]->GetMakefile()->GetStartDirectory()); it->second[0]->GetMakefile()->GetCurrentSourceDirectory());
// a linked resource must not point to a parent directory of .project or // a linked resource must not point to a parent directory of .project or
// .project itself // .project itself
if ((baseDir != linkSourceDirectory) && if ((baseDir != linkSourceDirectory) &&

View File

@ -41,7 +41,7 @@ void cmExtraQbsGenerator::CreateProjectFile(
const std::vector<cmLocalGenerator *> &lgs) const std::vector<cmLocalGenerator *> &lgs)
{ {
const cmMakefile *mf = lgs[0]->GetMakefile(); const cmMakefile *mf = lgs[0]->GetMakefile();
std::string outputDir = mf->GetStartOutputDirectory(); std::string outputDir = mf->GetCurrentBinaryDirectory();
const std::string filename = outputDir + "/" + name + ".qbs"; const std::string filename = outputDir + "/" + name + ".qbs";

View File

@ -79,7 +79,7 @@ void cmExtraSublimeTextGenerator::CreateProjectFile(
const std::vector<cmLocalGenerator*>& lgs) const std::vector<cmLocalGenerator*>& lgs)
{ {
const cmMakefile* mf=lgs[0]->GetMakefile(); const cmMakefile* mf=lgs[0]->GetMakefile();
std::string outputDir=mf->GetStartOutputDirectory(); std::string outputDir=mf->GetCurrentBinaryDirectory();
std::string projectName=mf->GetProjectName(); std::string projectName=mf->GetProjectName();
const std::string filename = const std::string filename =
@ -174,7 +174,7 @@ void cmExtraSublimeTextGenerator::
{ {
// Only add the global targets from CMAKE_BINARY_DIR, // Only add the global targets from CMAKE_BINARY_DIR,
// not from the subdirs // not from the subdirs
if (strcmp(makefile->GetStartOutputDirectory(), if (strcmp(makefile->GetCurrentBinaryDirectory(),
makefile->GetHomeOutputDirectory())==0) makefile->GetHomeOutputDirectory())==0)
{ {
this->AppendTarget(fout, ti->first, *lg, 0, this->AppendTarget(fout, ti->first, *lg, 0,

View File

@ -124,7 +124,7 @@ void cmFLTKWrapUICommand::FinalPass()
"FLTK_WRAP_UI was called with a target that was never created: "; "FLTK_WRAP_UI was called with a target that was never created: ";
msg += this->Target; msg += this->Target;
msg +=". The problem was found while processing the source directory: "; msg +=". The problem was found while processing the source directory: ";
msg += this->Makefile->GetStartDirectory(); msg += this->Makefile->GetCurrentSourceDirectory();
msg += ". This FLTK_WRAP_UI call will be ignored."; msg += ". This FLTK_WRAP_UI call will be ignored.";
cmSystemTools::Message(msg.c_str(),"Warning"); cmSystemTools::Message(msg.c_str(),"Warning");
return; return;
@ -156,7 +156,7 @@ void cmFLTKWrapUICommand::FinalPass()
"for you as was done in CMake 2.0 and earlier. In the future this may " "for you as was done in CMake 2.0 and earlier. In the future this may "
"become an error."; "become an error.";
msg +="The problem was found while processing the source directory: "; msg +="The problem was found while processing the source directory: ";
msg += this->Makefile->GetStartDirectory(); msg += this->Makefile->GetCurrentSourceDirectory();
cmSystemTools::Message(msg.c_str(),"Warning"); cmSystemTools::Message(msg.c_str(),"Warning");
// first we add the rules for all the .fl to .h and .cxx files // first we add the rules for all the .fl to .h and .cxx files
size_t lastHeadersClass = this->GeneratedSourcesClasses.size(); size_t lastHeadersClass = this->GeneratedSourcesClasses.size();

View File

@ -1099,8 +1099,8 @@ bool cmStrictTargetComparison::operator()(cmTarget const* t1,
int nameResult = strcmp(t1->GetName().c_str(), t2->GetName().c_str()); int nameResult = strcmp(t1->GetName().c_str(), t2->GetName().c_str());
if (nameResult == 0) if (nameResult == 0)
{ {
return strcmp(t1->GetMakefile()->GetStartOutputDirectory(), return strcmp(t1->GetMakefile()->GetCurrentBinaryDirectory(),
t2->GetMakefile()->GetStartOutputDirectory()) < 0; t2->GetMakefile()->GetCurrentBinaryDirectory()) < 0;
} }
return nameResult < 0; return nameResult < 0;
} }

View File

@ -43,7 +43,7 @@ bool cmGetDirectoryPropertyCommand
// make sure the start dir is a full path // make sure the start dir is a full path
if (!cmSystemTools::FileIsFullPath(sd.c_str())) if (!cmSystemTools::FileIsFullPath(sd.c_str()))
{ {
sd = this->Makefile->GetStartDirectory(); sd = this->Makefile->GetCurrentSourceDirectory();
sd += "/"; sd += "/";
sd += *i; sd += *i;
} }

View File

@ -29,7 +29,7 @@ void cmGlobalBorlandMakefileGenerator
cmMakefile *mf, cmMakefile *mf,
bool optional) bool optional)
{ {
std::string outdir = this->CMakeInstance->GetStartOutputDirectory(); std::string outdir = this->CMakeInstance->GetHomeOutputDirectory();
mf->AddDefinition("BORLAND", "1"); mf->AddDefinition("BORLAND", "1");
mf->AddDefinition("CMAKE_GENERATOR_CC", "bcc32"); mf->AddDefinition("CMAKE_GENERATOR_CC", "bcc32");
mf->AddDefinition("CMAKE_GENERATOR_CXX", "bcc32"); mf->AddDefinition("CMAKE_GENERATOR_CXX", "bcc32");

View File

@ -1098,9 +1098,9 @@ void cmGlobalGenerator::Configure()
this->LocalGenerators.push_back(lg); this->LocalGenerators.push_back(lg);
// set the Start directories // set the Start directories
lg->GetMakefile()->SetStartDirectory lg->GetMakefile()->SetCurrentSourceDirectory
(this->CMakeInstance->GetHomeDirectory()); (this->CMakeInstance->GetHomeDirectory());
lg->GetMakefile()->SetStartOutputDirectory lg->GetMakefile()->SetCurrentBinaryDirectory
(this->CMakeInstance->GetHomeOutputDirectory()); (this->CMakeInstance->GetHomeOutputDirectory());
this->BinaryDirectories.insert( this->BinaryDirectories.insert(
@ -2046,7 +2046,7 @@ cmGlobalGenerator::FindLocalGenerator(const std::string& start_dir) const
for(std::vector<cmLocalGenerator*>::const_iterator it = for(std::vector<cmLocalGenerator*>::const_iterator it =
this->LocalGenerators.begin(); it != this->LocalGenerators.end(); ++it) this->LocalGenerators.begin(); it != this->LocalGenerators.end(); ++it)
{ {
std::string sd = (*it)->GetMakefile()->GetStartDirectory(); std::string sd = (*it)->GetMakefile()->GetCurrentSourceDirectory();
if (sd == start_dir) if (sd == start_dir)
{ {
return *it; return *it;
@ -2136,7 +2136,7 @@ void cmGlobalGenerator::CreateDefaultGlobalTargets(cmTargets* targets)
const char* cmakeCommand = mf->GetRequiredDefinition("CMAKE_COMMAND"); const char* cmakeCommand = mf->GetRequiredDefinition("CMAKE_COMMAND");
// CPack // CPack
std::string workingDir = mf->GetStartOutputDirectory(); std::string workingDir = mf->GetCurrentBinaryDirectory();
cmCustomCommandLines cpackCommandLines; cmCustomCommandLines cpackCommandLines;
std::vector<std::string> depends; std::vector<std::string> depends;
cmCustomCommandLine singleLine; cmCustomCommandLine singleLine;
@ -2147,7 +2147,7 @@ void cmGlobalGenerator::CreateDefaultGlobalTargets(cmTargets* targets)
singleLine.push_back(cmakeCfgIntDir); singleLine.push_back(cmakeCfgIntDir);
} }
singleLine.push_back("--config"); singleLine.push_back("--config");
std::string configFile = mf->GetStartOutputDirectory();; std::string configFile = mf->GetCurrentBinaryDirectory();;
configFile += "/CPackConfig.cmake"; configFile += "/CPackConfig.cmake";
std::string relConfigFile = "./CPackConfig.cmake"; std::string relConfigFile = "./CPackConfig.cmake";
singleLine.push_back(relConfigFile); singleLine.push_back(relConfigFile);
@ -2183,7 +2183,7 @@ void cmGlobalGenerator::CreateDefaultGlobalTargets(cmTargets* targets)
depends.erase(depends.begin(), depends.end()); depends.erase(depends.begin(), depends.end());
singleLine.push_back(cmSystemTools::GetCPackCommand()); singleLine.push_back(cmSystemTools::GetCPackCommand());
singleLine.push_back("--config"); singleLine.push_back("--config");
configFile = mf->GetStartOutputDirectory();; configFile = mf->GetCurrentBinaryDirectory();;
configFile += "/CPackSourceConfig.cmake"; configFile += "/CPackSourceConfig.cmake";
relConfigFile = "./CPackSourceConfig.cmake"; relConfigFile = "./CPackSourceConfig.cmake";
singleLine.push_back(relConfigFile); singleLine.push_back(relConfigFile);

View File

@ -50,7 +50,7 @@ void cmGlobalKdevelopGenerator::Generate()
++it) ++it)
{ {
cmMakefile* mf = it->second[0]->GetMakefile(); cmMakefile* mf = it->second[0]->GetMakefile();
std::string outputDir=mf->GetStartOutputDirectory(); std::string outputDir=mf->GetCurrentBinaryDirectory();
std::string projectDir=mf->GetHomeDirectory(); std::string projectDir=mf->GetHomeDirectory();
std::string projectName=mf->GetProjectName(); std::string projectName=mf->GetProjectName();
std::string cmakeFilePattern("CMakeLists.txt;*.cmake;"); std::string cmakeFilePattern("CMakeLists.txt;*.cmake;");

View File

@ -886,7 +886,7 @@ cmGlobalNinjaGenerator
case cmTarget::OBJECT_LIBRARY: case cmTarget::OBJECT_LIBRARY:
case cmTarget::UTILITY: { case cmTarget::UTILITY: {
std::string path = ng->ConvertToNinjaPath( std::string path = ng->ConvertToNinjaPath(
target->GetMakefile()->GetStartOutputDirectory()); target->GetMakefile()->GetCurrentBinaryDirectory());
if (path.empty() || path == ".") if (path.empty() || path == ".")
outputs.push_back(target->GetName()); outputs.push_back(target->GetName());
else { else {

View File

@ -158,7 +158,7 @@ void cmGlobalUnixMakefileGenerator3::Generate()
{ {
cmLocalUnixMakefileGenerator3 *lg = cmLocalUnixMakefileGenerator3 *lg =
static_cast<cmLocalUnixMakefileGenerator3 *>(this->LocalGenerators[i]); static_cast<cmLocalUnixMakefileGenerator3 *>(this->LocalGenerators[i]);
std::string markFileName = lg->GetMakefile()->GetStartOutputDirectory(); std::string markFileName = lg->GetMakefile()->GetCurrentBinaryDirectory();
markFileName += "/"; markFileName += "/";
markFileName += cmake::GetCMakeFilesDirectory(); markFileName += cmake::GetCMakeFilesDirectory();
markFileName += "/progress.marks"; markFileName += "/progress.marks";
@ -390,7 +390,7 @@ void cmGlobalUnixMakefileGenerator3::WriteMainCMakefile()
{ {
lg = lg =
static_cast<cmLocalUnixMakefileGenerator3 *>(this->LocalGenerators[i]); static_cast<cmLocalUnixMakefileGenerator3 *>(this->LocalGenerators[i]);
tmpStr = lg->GetMakefile()->GetStartOutputDirectory(); tmpStr = lg->GetMakefile()->GetCurrentBinaryDirectory();
tmpStr += cmake::GetCMakeFilesDirectory(); tmpStr += cmake::GetCMakeFilesDirectory();
tmpStr += "/CMakeDirectoryInformation.cmake"; tmpStr += "/CMakeDirectoryInformation.cmake";
cmakefileStream << " \"" << cmakefileStream << " \"" <<
@ -449,7 +449,7 @@ cmGlobalUnixMakefileGenerator3
bool check_relink) bool check_relink)
{ {
// Get the relative path to the subdirectory from the top. // Get the relative path to the subdirectory from the top.
std::string makeTarget = lg->GetMakefile()->GetStartOutputDirectory(); std::string makeTarget = lg->GetMakefile()->GetCurrentBinaryDirectory();
makeTarget += "/"; makeTarget += "/";
makeTarget += pass; makeTarget += pass;
@ -494,7 +494,7 @@ cmGlobalUnixMakefileGenerator3
{ {
cmLocalUnixMakefileGenerator3* slg = cmLocalUnixMakefileGenerator3* slg =
static_cast<cmLocalUnixMakefileGenerator3*>(*sdi); static_cast<cmLocalUnixMakefileGenerator3*>(*sdi);
std::string subdir = slg->GetMakefile()->GetStartOutputDirectory(); std::string subdir = slg->GetMakefile()->GetCurrentBinaryDirectory();
subdir += "/"; subdir += "/";
subdir += pass; subdir += pass;
depends.push_back(subdir); depends.push_back(subdir);
@ -529,7 +529,7 @@ cmGlobalUnixMakefileGenerator3
} }
// Begin the directory-level rules section. // Begin the directory-level rules section.
std::string dir = lg->GetMakefile()->GetStartOutputDirectory(); std::string dir = lg->GetMakefile()->GetCurrentBinaryDirectory();
dir = lg->Convert(dir, cmLocalGenerator::HOME_OUTPUT, dir = lg->Convert(dir, cmLocalGenerator::HOME_OUTPUT,
cmLocalGenerator::MAKERULE); cmLocalGenerator::MAKERULE);
lg->WriteDivider(ruleFileStream); lg->WriteDivider(ruleFileStream);
@ -583,9 +583,9 @@ void cmGlobalUnixMakefileGenerator3
lg = static_cast<cmLocalUnixMakefileGenerator3 *> lg = static_cast<cmLocalUnixMakefileGenerator3 *>
(this->CreateLocalGenerator()); (this->CreateLocalGenerator());
// set the Start directories // set the Start directories
lg->GetMakefile()->SetStartDirectory lg->GetMakefile()->SetCurrentSourceDirectory
(this->CMakeInstance->GetHomeDirectory()); (this->CMakeInstance->GetHomeDirectory());
lg->GetMakefile()->SetStartOutputDirectory lg->GetMakefile()->SetCurrentBinaryDirectory
(this->CMakeInstance->GetHomeOutputDirectory()); (this->CMakeInstance->GetHomeOutputDirectory());
} }

View File

@ -239,7 +239,7 @@ void cmGlobalVisualStudio6Generator
else else
{ {
std::string dspname = GetVS6TargetName(target->GetName()); std::string dspname = GetVS6TargetName(target->GetName());
std::string dir = target->GetMakefile()->GetStartOutputDirectory(); std::string dir = target->GetMakefile()->GetCurrentBinaryDirectory();
dir = root->Convert(dir.c_str(), cmLocalGenerator::START_OUTPUT); dir = root->Convert(dir.c_str(), cmLocalGenerator::START_OUTPUT);
this->WriteProject(fout, dspname.c_str(), dir.c_str(), *target); this->WriteProject(fout, dspname.c_str(), dir.c_str(), *target);
} }
@ -257,7 +257,7 @@ void cmGlobalVisualStudio6Generator
{ {
return; return;
} }
std::string fname = root->GetMakefile()->GetStartOutputDirectory(); std::string fname = root->GetMakefile()->GetCurrentBinaryDirectory();
fname += "/"; fname += "/";
fname += root->GetMakefile()->GetProjectName(); fname += root->GetMakefile()->GetProjectName();
fname += ".dsw"; fname += ".dsw";
@ -386,7 +386,7 @@ cmGlobalVisualStudio6Generator::WriteUtilityDepend(cmTarget const* target)
std::string pname = target->GetName(); std::string pname = target->GetName();
pname += "_UTILITY"; pname += "_UTILITY";
pname = GetVS6TargetName(pname.c_str()); pname = GetVS6TargetName(pname.c_str());
std::string fname = target->GetMakefile()->GetStartOutputDirectory(); std::string fname = target->GetMakefile()->GetCurrentBinaryDirectory();
fname += "/"; fname += "/";
fname += pname; fname += pname;
fname += ".dsp"; fname += ".dsp";

View File

@ -379,7 +379,7 @@ void cmGlobalVisualStudio7Generator
return; return;
} }
this->CurrentProject = root->GetMakefile()->GetProjectName(); this->CurrentProject = root->GetMakefile()->GetProjectName();
std::string fname = root->GetMakefile()->GetStartOutputDirectory(); std::string fname = root->GetMakefile()->GetCurrentBinaryDirectory();
fname += "/"; fname += "/";
fname += root->GetMakefile()->GetProjectName(); fname += root->GetMakefile()->GetProjectName();
fname += ".sln"; fname += ".sln";
@ -485,7 +485,7 @@ void cmGlobalVisualStudio7Generator::WriteTargetsToSolution(
if(vcprojName) if(vcprojName)
{ {
cmMakefile* tmf = target->GetMakefile(); cmMakefile* tmf = target->GetMakefile();
std::string dir = tmf->GetStartOutputDirectory(); std::string dir = tmf->GetCurrentBinaryDirectory();
dir = root->Convert(dir.c_str(), dir = root->Convert(dir.c_str(),
cmLocalGenerator::START_OUTPUT); cmLocalGenerator::START_OUTPUT);
if(dir == ".") if(dir == ".")
@ -561,7 +561,7 @@ void cmGlobalVisualStudio7Generator::WriteTargetDepends(
target->GetProperty("GENERATOR_FILE_NAME"); target->GetProperty("GENERATOR_FILE_NAME");
if (vcprojName) if (vcprojName)
{ {
std::string dir = mf->GetStartDirectory(); std::string dir = mf->GetCurrentSourceDirectory();
this->WriteProjectDepends(fout, vcprojName, this->WriteProjectDepends(fout, vcprojName,
dir.c_str(), *target); dir.c_str(), *target);
} }
@ -903,7 +903,7 @@ cmGlobalVisualStudio7Generator::WriteUtilityDepend(cmTarget const* target)
{ {
std::string pname = target->GetName(); std::string pname = target->GetName();
pname += "_UTILITY"; pname += "_UTILITY";
std::string fname = target->GetMakefile()->GetStartOutputDirectory(); std::string fname = target->GetMakefile()->GetCurrentBinaryDirectory();
fname += "/"; fname += "/";
fname += pname; fname += pname;
fname += ".vcproj"; fname += ".vcproj";

View File

@ -225,7 +225,7 @@ cmGlobalVisualStudioGenerator
} }
else else
{ {
topLevelSlnName = mf->GetStartOutputDirectory(); topLevelSlnName = mf->GetCurrentBinaryDirectory();
topLevelSlnName += "/"; topLevelSlnName += "/";
topLevelSlnName += mf->GetProjectName(); topLevelSlnName += mf->GetProjectName();
topLevelSlnName += ".sln"; topLevelSlnName += ".sln";

View File

@ -453,7 +453,7 @@ cmGlobalXCodeGenerator::AddExtraTargets(cmLocalGenerator* root,
cmTarget* allbuild = mf->FindTarget("ALL_BUILD"); cmTarget* allbuild = mf->FindTarget("ALL_BUILD");
// Refer to the main build configuration file for easy editing. // Refer to the main build configuration file for easy editing.
std::string listfile = mf->GetStartDirectory(); std::string listfile = mf->GetCurrentSourceDirectory();
listfile += "/"; listfile += "/";
listfile += "CMakeLists.txt"; listfile += "CMakeLists.txt";
allbuild->AddSourceCMP0049(listfile.c_str()); allbuild->AddSourceCMP0049(listfile.c_str());
@ -538,7 +538,7 @@ cmGlobalXCodeGenerator::AddExtraTargets(cmLocalGenerator* root,
} }
// Refer to the build configuration file for easy editing. // Refer to the build configuration file for easy editing.
listfile = lg->GetMakefile()->GetStartDirectory(); listfile = lg->GetMakefile()->GetCurrentSourceDirectory();
listfile += "/"; listfile += "/";
listfile += "CMakeLists.txt"; listfile += "CMakeLists.txt";
target.AddSourceCMP0049(listfile.c_str()); target.AddSourceCMP0049(listfile.c_str());
@ -564,7 +564,7 @@ void cmGlobalXCodeGenerator::CreateReRunCMakeFile(
std::vector<std::string>::iterator new_end = std::vector<std::string>::iterator new_end =
std::unique(lfiles.begin(), lfiles.end()); std::unique(lfiles.begin(), lfiles.end());
lfiles.erase(new_end, lfiles.end()); lfiles.erase(new_end, lfiles.end());
this->CurrentReRunCMakeMakefile = mf->GetStartOutputDirectory(); this->CurrentReRunCMakeMakefile = mf->GetCurrentBinaryDirectory();
this->CurrentReRunCMakeMakefile += "/CMakeScripts"; this->CurrentReRunCMakeMakefile += "/CMakeScripts";
cmSystemTools::MakeDirectory(this->CurrentReRunCMakeMakefile.c_str()); cmSystemTools::MakeDirectory(this->CurrentReRunCMakeMakefile.c_str());
this->CurrentReRunCMakeMakefile += "/ReRunCMake.make"; this->CurrentReRunCMakeMakefile += "/ReRunCMake.make";
@ -3696,7 +3696,7 @@ cmGlobalXCodeGenerator::OutputXCodeProject(cmLocalGenerator* root,
{ {
return; return;
} }
std::string xcodeDir = root->GetMakefile()->GetStartOutputDirectory(); std::string xcodeDir = root->GetMakefile()->GetCurrentBinaryDirectory();
xcodeDir += "/"; xcodeDir += "/";
xcodeDir += root->GetMakefile()->GetProjectName(); xcodeDir += root->GetMakefile()->GetProjectName();
xcodeDir += ".xcode"; xcodeDir += ".xcode";

View File

@ -91,7 +91,7 @@ bool cmIncludeCommand
std::string fname_abs = std::string fname_abs =
cmSystemTools::CollapseFullPath(fname, cmSystemTools::CollapseFullPath(fname,
this->Makefile->GetStartDirectory()); this->Makefile->GetCurrentSourceDirectory());
cmGlobalGenerator *gg = this->Makefile->GetLocalGenerator() cmGlobalGenerator *gg = this->Makefile->GetLocalGenerator()
->GetGlobalGenerator(); ->GetGlobalGenerator();

View File

@ -149,7 +149,7 @@ void cmIncludeDirectoryCommand::NormalizeInclude(std::string &inc)
{ {
if(!StartsWithGeneratorExpression(inc)) if(!StartsWithGeneratorExpression(inc))
{ {
std::string tmp = this->Makefile->GetStartDirectory(); std::string tmp = this->Makefile->GetCurrentSourceDirectory();
tmp += "/"; tmp += "/";
tmp += inc; tmp += inc;
inc = tmp; inc = tmp;

View File

@ -69,7 +69,7 @@ void cmInstallTargetGenerator::GenerateScriptForConfig(std::ostream& os,
std::string fromDirConfig; std::string fromDirConfig;
if(this->Target->NeedRelinkBeforeInstall(config)) if(this->Target->NeedRelinkBeforeInstall(config))
{ {
fromDirConfig = this->Target->GetMakefile()->GetStartOutputDirectory(); fromDirConfig = this->Target->GetMakefile()->GetCurrentBinaryDirectory();
fromDirConfig += cmake::GetCMakeFilesDirectory(); fromDirConfig += cmake::GetCMakeFilesDirectory();
fromDirConfig += "/CMakeRelink.dir/"; fromDirConfig += "/CMakeRelink.dir/";
} }

View File

@ -60,7 +60,7 @@ void cmLinkDirectoriesCommand::AddLinkDir(std::string const& dir)
} }
if (convertToAbsolute) if (convertToAbsolute)
{ {
std::string tmp = this->Makefile->GetStartDirectory(); std::string tmp = this->Makefile->GetCurrentSourceDirectory();
tmp += "/"; tmp += "/";
tmp += unixPath; tmp += unixPath;
unixPath = tmp; unixPath = tmp;

View File

@ -101,7 +101,7 @@ void cmLocalGenerator::Configure()
static_cast<void>(clg); static_cast<void>(clg);
// make sure the CMakeFiles dir is there // make sure the CMakeFiles dir is there
std::string filesDir = this->Makefile->GetStartOutputDirectory(); std::string filesDir = this->Makefile->GetCurrentBinaryDirectory();
filesDir += cmake::GetCMakeFilesDirectory(); filesDir += cmake::GetCMakeFilesDirectory();
cmSystemTools::MakeDirectory(filesDir.c_str()); cmSystemTools::MakeDirectory(filesDir.c_str());
@ -177,7 +177,7 @@ void cmLocalGenerator::ComputeObjectMaxPath()
void cmLocalGenerator::ReadInputFile() void cmLocalGenerator::ReadInputFile()
{ {
// Look for the CMakeLists.txt file. // Look for the CMakeLists.txt file.
std::string currentStart = this->Makefile->GetStartDirectory(); std::string currentStart = this->Makefile->GetCurrentSourceDirectory();
currentStart += "/CMakeLists.txt"; currentStart += "/CMakeLists.txt";
if(cmSystemTools::FileExists(currentStart.c_str(), true)) if(cmSystemTools::FileExists(currentStart.c_str(), true))
{ {
@ -194,7 +194,7 @@ void cmLocalGenerator::ReadInputFile()
cmMakefile* mf = this->Parent->GetMakefile(); cmMakefile* mf = this->Parent->GetMakefile();
std::ostringstream e; std::ostringstream e;
e << "The source directory\n" e << "The source directory\n"
<< " " << this->Makefile->GetStartDirectory() << "\n" << " " << this->Makefile->GetCurrentSourceDirectory() << "\n"
<< "does not contain a CMakeLists.txt file."; << "does not contain a CMakeLists.txt file.";
switch (mf->GetPolicyStatus(cmPolicies::CMP0014)) switch (mf->GetPolicyStatus(cmPolicies::CMP0014))
{ {
@ -230,7 +230,8 @@ void cmLocalGenerator::SetupPathConversions()
cmSystemTools::CollapseFullPath(this->Makefile->GetHomeDirectory()); cmSystemTools::CollapseFullPath(this->Makefile->GetHomeDirectory());
cmSystemTools::SplitPath(outdir, this->HomeDirectoryComponents); cmSystemTools::SplitPath(outdir, this->HomeDirectoryComponents);
outdir = outdir =
cmSystemTools::CollapseFullPath(this->Makefile->GetStartDirectory()); cmSystemTools::CollapseFullPath(
this->Makefile->GetCurrentSourceDirectory());
cmSystemTools::SplitPath(outdir, this->StartDirectoryComponents); cmSystemTools::SplitPath(outdir, this->StartDirectoryComponents);
outdir = cmSystemTools::CollapseFullPath outdir = cmSystemTools::CollapseFullPath
@ -239,7 +240,7 @@ void cmLocalGenerator::SetupPathConversions()
this->HomeOutputDirectoryComponents); this->HomeOutputDirectoryComponents);
outdir = cmSystemTools::CollapseFullPath outdir = cmSystemTools::CollapseFullPath
(this->Makefile->GetStartOutputDirectory()); (this->Makefile->GetCurrentBinaryDirectory());
cmSystemTools::SplitPath(outdir, cmSystemTools::SplitPath(outdir,
this->StartOutputDirectoryComponents); this->StartOutputDirectoryComponents);
} }
@ -296,7 +297,7 @@ void cmLocalGenerator::GenerateTestFiles()
const std::string& config = const std::string& config =
this->Makefile->GetConfigurations(configurationTypes, false); this->Makefile->GetConfigurations(configurationTypes, false);
std::string file = this->Makefile->GetStartOutputDirectory(); std::string file = this->Makefile->GetCurrentBinaryDirectory();
file += "/"; file += "/";
file += "CTestTestfile.cmake"; file += "CTestTestfile.cmake";
@ -305,9 +306,9 @@ void cmLocalGenerator::GenerateTestFiles()
fout << "# CMake generated Testfile for " << std::endl fout << "# CMake generated Testfile for " << std::endl
<< "# Source directory: " << "# Source directory: "
<< this->Makefile->GetStartDirectory() << std::endl << this->Makefile->GetCurrentSourceDirectory() << std::endl
<< "# Build directory: " << "# Build directory: "
<< this->Makefile->GetStartOutputDirectory() << std::endl << this->Makefile->GetCurrentBinaryDirectory() << std::endl
<< "# " << std::endl << "# " << std::endl
<< "# This file includes the relevant testing commands " << "# This file includes the relevant testing commands "
<< "required for " << std::endl << "required for " << std::endl
@ -337,7 +338,7 @@ void cmLocalGenerator::GenerateTestFiles()
// TODO: Use add_subdirectory instead? // TODO: Use add_subdirectory instead?
fout << "subdirs("; fout << "subdirs(";
std::string outP = std::string outP =
this->Children[i]->GetMakefile()->GetStartOutputDirectory(); this->Children[i]->GetMakefile()->GetCurrentBinaryDirectory();
fout << this->Convert(outP,START_OUTPUT); fout << this->Convert(outP,START_OUTPUT);
fout << ")" << std::endl; fout << ")" << std::endl;
} }
@ -421,7 +422,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->GetCurrentBinaryDirectory();
std::string homedir = this->Makefile->GetHomeOutputDirectory(); std::string homedir = this->Makefile->GetHomeOutputDirectory();
std::string currdir = this->Makefile->GetCurrentBinaryDirectory(); std::string currdir = this->Makefile->GetCurrentBinaryDirectory();
cmSystemTools::ConvertToUnixSlashes(file); cmSystemTools::ConvertToUnixSlashes(file);
@ -511,7 +512,7 @@ void cmLocalGenerator::GenerateInstallRules()
{ {
if(!(*ci)->GetMakefile()->GetPropertyAsBool("EXCLUDE_FROM_ALL")) if(!(*ci)->GetMakefile()->GetPropertyAsBool("EXCLUDE_FROM_ALL"))
{ {
std::string odir = (*ci)->GetMakefile()->GetStartOutputDirectory(); std::string odir = (*ci)->GetMakefile()->GetCurrentBinaryDirectory();
cmSystemTools::ConvertToUnixSlashes(odir); cmSystemTools::ConvertToUnixSlashes(odir);
fout << " include(\"" << odir fout << " include(\"" << odir
<< "/cmake_install.cmake\")" << std::endl; << "/cmake_install.cmake\")" << std::endl;
@ -647,7 +648,7 @@ void cmLocalGenerator::AddCustomCommandToCreateObject(const char* ofname,
source.GetFullPath(), source.GetFullPath(),
commandLines, commandLines,
comment.c_str(), comment.c_str(),
this->Makefile->GetStartOutputDirectory() this->Makefile->GetCurrentBinaryDirectory()
); );
} }
@ -744,7 +745,7 @@ void cmLocalGenerator::AddBuildTargetRule(const std::string& llang,
"", "",
commandLines, commandLines,
comment.c_str(), comment.c_str(),
this->Makefile->GetStartOutputDirectory() this->Makefile->GetCurrentBinaryDirectory()
); );
this->Makefile->GetSource(targetFullPath); this->Makefile->GetSource(targetFullPath);
target.Target->AddSource(targetFullPath); target.Target->AddSource(targetFullPath);
@ -1548,18 +1549,19 @@ void cmLocalGenerator::GetIncludeDirectories(std::vector<std::string>& dirs,
if(includeBinaryDir) if(includeBinaryDir)
{ {
if(emitted.find( if(emitted.find(
this->Makefile->GetStartOutputDirectory()) == emitted.end()) this->Makefile->GetCurrentBinaryDirectory()) == emitted.end())
{ {
dirs.push_back(this->Makefile->GetStartOutputDirectory()); dirs.push_back(this->Makefile->GetCurrentBinaryDirectory());
emitted.insert(this->Makefile->GetStartOutputDirectory()); emitted.insert(this->Makefile->GetCurrentBinaryDirectory());
} }
} }
if(includeSourceDir) if(includeSourceDir)
{ {
if(emitted.find(this->Makefile->GetStartDirectory()) == emitted.end()) if(emitted.find(
this->Makefile->GetCurrentSourceDirectory()) == emitted.end())
{ {
dirs.push_back(this->Makefile->GetStartDirectory()); dirs.push_back(this->Makefile->GetCurrentSourceDirectory());
emitted.insert(this->Makefile->GetStartDirectory()); emitted.insert(this->Makefile->GetCurrentSourceDirectory());
} }
} }
@ -2714,9 +2716,9 @@ const char* cmLocalGenerator::GetRelativeRootPath(RelativeRoot relroot)
switch (relroot) switch (relroot)
{ {
case HOME: return this->Makefile->GetHomeDirectory(); case HOME: return this->Makefile->GetHomeDirectory();
case START: return this->Makefile->GetStartDirectory(); case START: return this->Makefile->GetCurrentSourceDirectory();
case HOME_OUTPUT: return this->Makefile->GetHomeOutputDirectory(); case HOME_OUTPUT: return this->Makefile->GetHomeOutputDirectory();
case START_OUTPUT: return this->Makefile->GetStartOutputDirectory(); case START_OUTPUT: return this->Makefile->GetCurrentBinaryDirectory();
default: break; default: break;
} }
return 0; return 0;
@ -2844,14 +2846,14 @@ std::string cmLocalGenerator::FindRelativePathTopSource()
{ {
std::string parentTop = parent->FindRelativePathTopSource(); std::string parentTop = parent->FindRelativePathTopSource();
if(cmSystemTools::IsSubDirectory( if(cmSystemTools::IsSubDirectory(
this->Makefile->GetStartDirectory(), parentTop)) this->Makefile->GetCurrentSourceDirectory(), parentTop))
{ {
return parentTop; return parentTop;
} }
} }
// Otherwise this directory itself is the new top. // Otherwise this directory itself is the new top.
return this->Makefile->GetStartDirectory(); return this->Makefile->GetCurrentSourceDirectory();
} }
//---------------------------------------------------------------------------- //----------------------------------------------------------------------------
@ -2864,14 +2866,14 @@ std::string cmLocalGenerator::FindRelativePathTopBinary()
{ {
std::string parentTop = parent->FindRelativePathTopBinary(); std::string parentTop = parent->FindRelativePathTopBinary();
if(cmSystemTools::IsSubDirectory( if(cmSystemTools::IsSubDirectory(
this->Makefile->GetStartOutputDirectory(), parentTop)) this->Makefile->GetCurrentBinaryDirectory(), parentTop))
{ {
return parentTop; return parentTop;
} }
} }
// Otherwise this directory itself is the new top. // Otherwise this directory itself is the new top.
return this->Makefile->GetStartOutputDirectory(); return this->Makefile->GetCurrentBinaryDirectory();
} }
//---------------------------------------------------------------------------- //----------------------------------------------------------------------------

View File

@ -46,7 +46,7 @@ void cmLocalGhsMultiGenerator::Configure()
// Compute the path to use when referencing the current output // Compute the path to use when referencing the current output
// directory from the top output directory. // directory from the top output directory.
this->HomeRelativeOutputPath = this->HomeRelativeOutputPath =
this->Convert(this->Makefile->GetStartOutputDirectory(), HOME_OUTPUT); this->Convert(this->Makefile->GetCurrentBinaryDirectory(), HOME_OUTPUT);
if (this->HomeRelativeOutputPath == ".") if (this->HomeRelativeOutputPath == ".")
{ {
this->HomeRelativeOutputPath = ""; this->HomeRelativeOutputPath = "";

View File

@ -102,7 +102,7 @@ void cmLocalNinjaGenerator::Configure()
// Compute the path to use when referencing the current output // Compute the path to use when referencing the current output
// directory from the top output directory. // directory from the top output directory.
this->HomeRelativeOutputPath = this->HomeRelativeOutputPath =
this->Convert(this->Makefile->GetStartOutputDirectory(), HOME_OUTPUT); this->Convert(this->Makefile->GetCurrentBinaryDirectory(), HOME_OUTPUT);
if(this->HomeRelativeOutputPath == ".") if(this->HomeRelativeOutputPath == ".")
{ {
this->HomeRelativeOutputPath = ""; this->HomeRelativeOutputPath = "";
@ -407,7 +407,7 @@ void cmLocalNinjaGenerator::AppendCustomCommandLines(
if (ccg.GetNumberOfCommands() > 0) { if (ccg.GetNumberOfCommands() > 0) {
std::string wd = ccg.GetWorkingDirectory(); std::string wd = ccg.GetWorkingDirectory();
if (wd.empty()) if (wd.empty())
wd = this->GetMakefile()->GetStartOutputDirectory(); wd = this->GetMakefile()->GetCurrentBinaryDirectory();
std::ostringstream cdCmd; std::ostringstream cdCmd;
#ifdef _WIN32 #ifdef _WIN32

View File

@ -106,7 +106,7 @@ void cmLocalUnixMakefileGenerator3::Configure()
// Compute the path to use when referencing the current output // Compute the path to use when referencing the current output
// directory from the top output directory. // directory from the top output directory.
this->HomeRelativeOutputPath = this->HomeRelativeOutputPath =
this->Convert(this->Makefile->GetStartOutputDirectory(), HOME_OUTPUT); this->Convert(this->Makefile->GetCurrentBinaryDirectory(), HOME_OUTPUT);
if(this->HomeRelativeOutputPath == ".") if(this->HomeRelativeOutputPath == ".")
{ {
this->HomeRelativeOutputPath = ""; this->HomeRelativeOutputPath = "";
@ -526,7 +526,7 @@ void cmLocalUnixMakefileGenerator3
//---------------------------------------------------------------------------- //----------------------------------------------------------------------------
void cmLocalUnixMakefileGenerator3::WriteDirectoryInformationFile() void cmLocalUnixMakefileGenerator3::WriteDirectoryInformationFile()
{ {
std::string infoFileName = this->Makefile->GetStartOutputDirectory(); std::string infoFileName = this->Makefile->GetCurrentBinaryDirectory();
infoFileName += cmake::GetCMakeFilesDirectory(); infoFileName += cmake::GetCMakeFilesDirectory();
infoFileName += "/CMakeDirectoryInformation.cmake"; infoFileName += "/CMakeDirectoryInformation.cmake";
@ -588,7 +588,7 @@ std::string
cmLocalUnixMakefileGenerator3 cmLocalUnixMakefileGenerator3
::ConvertToFullPath(const std::string& localPath) ::ConvertToFullPath(const std::string& localPath)
{ {
std::string dir = this->Makefile->GetStartOutputDirectory(); std::string dir = this->Makefile->GetCurrentBinaryDirectory();
dir += "/"; dir += "/";
dir += localPath; dir += localPath;
return dir; return dir;
@ -1086,7 +1086,7 @@ cmLocalUnixMakefileGenerator3
} }
// if the command specified a working directory use it. // if the command specified a working directory use it.
std::string dir = this->Makefile->GetStartOutputDirectory(); std::string dir = this->Makefile->GetCurrentBinaryDirectory();
std::string workingDir = ccg.GetWorkingDirectory(); std::string workingDir = ccg.GetWorkingDirectory();
if(!workingDir.empty()) if(!workingDir.empty())
{ {
@ -1515,7 +1515,7 @@ bool cmLocalUnixMakefileGenerator3::UpdateDependencies(const char* tgtInfo,
// If the directory information is newer than depend.internal, include dirs // If the directory information is newer than depend.internal, include dirs
// may have changed. In this case discard all old dependencies. // may have changed. In this case discard all old dependencies.
bool needRescanDirInfo = false; bool needRescanDirInfo = false;
std::string dirInfoFile = this->Makefile->GetStartOutputDirectory(); std::string dirInfoFile = this->Makefile->GetCurrentBinaryDirectory();
dirInfoFile += cmake::GetCMakeFilesDirectory(); dirInfoFile += cmake::GetCMakeFilesDirectory();
dirInfoFile += "/CMakeDirectoryInformation.cmake"; dirInfoFile += "/CMakeDirectoryInformation.cmake";
{ {
@ -1589,7 +1589,7 @@ cmLocalUnixMakefileGenerator3
// Read the directory information file. // Read the directory information file.
cmMakefile* mf = this->Makefile; cmMakefile* mf = this->Makefile;
bool haveDirectoryInfo = false; bool haveDirectoryInfo = false;
std::string dirInfoFile = this->Makefile->GetStartOutputDirectory(); std::string dirInfoFile = this->Makefile->GetCurrentBinaryDirectory();
dirInfoFile += cmake::GetCMakeFilesDirectory(); dirInfoFile += cmake::GetCMakeFilesDirectory();
dirInfoFile += "/CMakeDirectoryInformation.cmake"; dirInfoFile += "/CMakeDirectoryInformation.cmake";
if(mf->ReadListFile(dirInfoFile.c_str()) && if(mf->ReadListFile(dirInfoFile.c_str()) &&
@ -1847,7 +1847,7 @@ void cmLocalUnixMakefileGenerator3
// Write the all rule. // Write the all rule.
std::string dir; std::string dir;
std::string recursiveTarget = this->Makefile->GetStartOutputDirectory(); std::string recursiveTarget = this->Makefile->GetCurrentBinaryDirectory();
recursiveTarget += "/all"; recursiveTarget += "/all";
depends.push_back("cmake_check_build_system"); depends.push_back("cmake_check_build_system");
@ -1891,7 +1891,7 @@ void cmLocalUnixMakefileGenerator3
depends, commands, true); depends, commands, true);
// Write the clean rule. // Write the clean rule.
recursiveTarget = this->Makefile->GetStartOutputDirectory(); recursiveTarget = this->Makefile->GetCurrentBinaryDirectory();
recursiveTarget += "/clean"; recursiveTarget += "/clean";
commands.clear(); commands.clear();
depends.clear(); depends.clear();
@ -1909,7 +1909,7 @@ void cmLocalUnixMakefileGenerator3
depends, commands, true); depends, commands, true);
// Write the preinstall rule. // Write the preinstall rule.
recursiveTarget = this->Makefile->GetStartOutputDirectory(); recursiveTarget = this->Makefile->GetCurrentBinaryDirectory();
recursiveTarget += "/preinstall"; recursiveTarget += "/preinstall";
commands.clear(); commands.clear();
depends.clear(); depends.clear();

View File

@ -117,14 +117,14 @@ void cmLocalVisualStudio6Generator::Generate()
void cmLocalVisualStudio6Generator::OutputDSPFile() void cmLocalVisualStudio6Generator::OutputDSPFile()
{ {
// If not an in source build, then create the output directory // If not an in source build, then create the output directory
if(strcmp(this->Makefile->GetStartOutputDirectory(), if(strcmp(this->Makefile->GetCurrentBinaryDirectory(),
this->Makefile->GetHomeDirectory()) != 0) this->Makefile->GetHomeDirectory()) != 0)
{ {
if(!cmSystemTools::MakeDirectory if(!cmSystemTools::MakeDirectory
(this->Makefile->GetStartOutputDirectory())) (this->Makefile->GetCurrentBinaryDirectory()))
{ {
cmSystemTools::Error("Error creating directory ", cmSystemTools::Error("Error creating directory ",
this->Makefile->GetStartOutputDirectory()); this->Makefile->GetCurrentBinaryDirectory());
} }
} }
@ -169,7 +169,7 @@ void cmLocalVisualStudio6Generator::OutputDSPFile()
std::string::size_type pos = l->first.rfind('/'); std::string::size_type pos = l->first.rfind('/');
if(pos != std::string::npos) if(pos != std::string::npos)
{ {
std::string dir = this->Makefile->GetStartOutputDirectory(); std::string dir = this->Makefile->GetCurrentBinaryDirectory();
dir += "/"; dir += "/";
dir += l->first.substr(0, pos); dir += l->first.substr(0, pos);
if(!cmSystemTools::MakeDirectory(dir.c_str())) if(!cmSystemTools::MakeDirectory(dir.c_str()))
@ -195,7 +195,7 @@ void cmLocalVisualStudio6Generator::CreateSingleDSP(const std::string& lname,
// create the dsp.cmake file // create the dsp.cmake file
std::string fname; std::string fname;
fname = this->Makefile->GetStartOutputDirectory(); fname = this->Makefile->GetCurrentBinaryDirectory();
fname += "/"; fname += "/";
fname += pname; fname += pname;
fname += ".dsp"; fname += ".dsp";
@ -223,7 +223,7 @@ void cmLocalVisualStudio6Generator::AddDSPBuildRule(cmTarget& tgt)
this->Makefile->GetRequiredDefinition("CMAKE_COMMAND"); this->Makefile->GetRequiredDefinition("CMAKE_COMMAND");
cmCustomCommandLine commandLine; cmCustomCommandLine commandLine;
commandLine.push_back(dsprule); commandLine.push_back(dsprule);
std::string makefileIn = this->Makefile->GetStartDirectory(); std::string makefileIn = this->Makefile->GetCurrentSourceDirectory();
makefileIn += "/"; makefileIn += "/";
makefileIn += "CMakeLists.txt"; makefileIn += "CMakeLists.txt";
if(!cmSystemTools::FileExists(makefileIn.c_str())) if(!cmSystemTools::FileExists(makefileIn.c_str()))
@ -585,9 +585,9 @@ cmLocalVisualStudio6Generator
const cmCustomCommand& origCommand) const cmCustomCommand& origCommand)
{ {
// Create a fake output that forces the rule to run. // Create a fake output that forces the rule to run.
char* output = new char[(strlen(this->Makefile->GetStartOutputDirectory()) + char* output = new char[(strlen(this->Makefile->GetCurrentBinaryDirectory())
target.GetName().size() + 30)]; + target.GetName().size() + 30)];
sprintf(output,"%s/%s_force_%i", this->Makefile->GetStartOutputDirectory(), sprintf(output,"%s/%s_force_%i", this->Makefile->GetCurrentBinaryDirectory(),
target.GetName().c_str(), count); target.GetName().c_str(), count);
const char* comment = origCommand.GetComment(); const char* comment = origCommand.GetComment();
if(!comment && origCommand.GetOutputs().empty()) if(!comment && origCommand.GetOutputs().empty())

View File

@ -151,7 +151,7 @@ void cmLocalVisualStudio7Generator::FixGlobalTargets()
cmCustomCommandLines force_commands; cmCustomCommandLines force_commands;
force_commands.push_back(force_command); force_commands.push_back(force_command);
std::string no_main_dependency = ""; std::string no_main_dependency = "";
std::string force = this->Makefile->GetStartOutputDirectory(); std::string force = this->Makefile->GetCurrentBinaryDirectory();
force += cmake::GetCMakeFilesDirectory(); force += cmake::GetCMakeFilesDirectory();
force += "/"; force += "/";
force += tgt.GetName(); force += tgt.GetName();
@ -173,14 +173,14 @@ void cmLocalVisualStudio7Generator::FixGlobalTargets()
void cmLocalVisualStudio7Generator::WriteProjectFiles() void cmLocalVisualStudio7Generator::WriteProjectFiles()
{ {
// If not an in source build, then create the output directory // If not an in source build, then create the output directory
if(strcmp(this->Makefile->GetStartOutputDirectory(), if(strcmp(this->Makefile->GetCurrentBinaryDirectory(),
this->Makefile->GetHomeDirectory()) != 0) this->Makefile->GetHomeDirectory()) != 0)
{ {
if(!cmSystemTools::MakeDirectory if(!cmSystemTools::MakeDirectory
(this->Makefile->GetStartOutputDirectory())) (this->Makefile->GetCurrentBinaryDirectory()))
{ {
cmSystemTools::Error("Error creating directory ", cmSystemTools::Error("Error creating directory ",
this->Makefile->GetStartOutputDirectory()); this->Makefile->GetCurrentBinaryDirectory());
} }
} }
@ -209,7 +209,7 @@ void cmLocalVisualStudio7Generator::WriteStampFiles()
{ {
// Touch a timestamp file used to determine when the project file is // Touch a timestamp file used to determine when the project file is
// out of date. // out of date.
std::string stampName = this->Makefile->GetStartOutputDirectory(); std::string stampName = this->Makefile->GetCurrentBinaryDirectory();
stampName += cmake::GetCMakeFilesDirectory(); stampName += cmake::GetCMakeFilesDirectory();
cmSystemTools::MakeDirectory(stampName.c_str()); cmSystemTools::MakeDirectory(stampName.c_str());
stampName += "/"; stampName += "/";
@ -257,7 +257,7 @@ void cmLocalVisualStudio7Generator
target.SetProperty("GENERATOR_FILE_NAME",lname.c_str()); target.SetProperty("GENERATOR_FILE_NAME",lname.c_str());
// create the dsp.cmake file // create the dsp.cmake file
std::string fname; std::string fname;
fname = this->Makefile->GetStartOutputDirectory(); fname = this->Makefile->GetCurrentBinaryDirectory();
fname += "/"; fname += "/";
fname += lname; fname += lname;
if(this->FortranProject) if(this->FortranProject)
@ -294,7 +294,7 @@ cmSourceFile* cmLocalVisualStudio7Generator::CreateVCProjBuildRule()
this->Makefile->GetRequiredDefinition("CMAKE_COMMAND"); this->Makefile->GetRequiredDefinition("CMAKE_COMMAND");
cmCustomCommandLine commandLine; cmCustomCommandLine commandLine;
commandLine.push_back(dsprule); commandLine.push_back(dsprule);
std::string makefileIn = this->Makefile->GetStartDirectory(); std::string makefileIn = this->Makefile->GetCurrentSourceDirectory();
makefileIn += "/"; makefileIn += "/";
makefileIn += "CMakeLists.txt"; makefileIn += "CMakeLists.txt";
makefileIn = cmSystemTools::CollapseFullPath(makefileIn.c_str()); makefileIn = cmSystemTools::CollapseFullPath(makefileIn.c_str());

View File

@ -1236,7 +1236,7 @@ cmMakefile::AddUtilityCommand(const std::string& utilityName,
// Store the custom command in the target. // Store the custom command in the target.
if (!commandLines.empty() || !depends.empty()) if (!commandLines.empty() || !depends.empty())
{ {
std::string force = this->GetStartOutputDirectory(); std::string force = this->GetCurrentBinaryDirectory();
force += cmake::GetCMakeFilesDirectory(); force += cmake::GetCMakeFilesDirectory();
force += "/"; force += "/";
force += utilityName; force += utilityName;
@ -1862,7 +1862,7 @@ void cmMakefile::CheckForUnused(const char* reason,
} }
else else
{ {
path = this->GetStartDirectory(); path = this->GetCurrentSourceDirectory();
path += "/CMakeLists.txt"; path += "/CMakeLists.txt";
cmListFileContext lfc; cmListFileContext lfc;
lfc.FilePath = path; lfc.FilePath = path;
@ -4040,7 +4040,7 @@ void cmMakefile::SetProperty(const std::string& prop, const char* value)
{ {
// This property is not inherrited // This property is not inherrited
if ( strcmp(this->GetCurrentSourceDirectory(), if ( strcmp(this->GetCurrentSourceDirectory(),
this->GetStartDirectory()) != 0 ) this->GetCurrentSourceDirectory()) != 0 )
{ {
return; return;
} }
@ -4104,7 +4104,7 @@ const char *cmMakefile::GetProperty(const std::string& prop,
{ {
if(cmLocalGenerator* plg = this->LocalGenerator->GetParent()) if(cmLocalGenerator* plg = this->LocalGenerator->GetParent())
{ {
output = plg->GetMakefile()->GetStartDirectory(); output = plg->GetMakefile()->GetCurrentSourceDirectory();
} }
return output.c_str(); return output.c_str();
} }

View File

@ -108,7 +108,7 @@ void cmMakefileExecutableTargetGenerator::WriteExecutableRule(bool relink)
std::string outpathImp; std::string outpathImp;
if(relink) if(relink)
{ {
outpath = this->Makefile->GetStartOutputDirectory(); outpath = this->Makefile->GetCurrentBinaryDirectory();
outpath += cmake::GetCMakeFilesDirectory(); outpath += cmake::GetCMakeFilesDirectory();
outpath += "/CMakeRelink.dir"; outpath += "/CMakeRelink.dir";
cmSystemTools::MakeDirectory(outpath.c_str()); cmSystemTools::MakeDirectory(outpath.c_str());
@ -419,7 +419,7 @@ void cmMakefileExecutableTargetGenerator::WriteExecutableRule(bool relink)
} }
this->LocalGenerator->CreateCDCommand this->LocalGenerator->CreateCDCommand
(commands1, (commands1,
this->Makefile->GetStartOutputDirectory(), this->Makefile->GetCurrentBinaryDirectory(),
cmLocalGenerator::HOME_OUTPUT); cmLocalGenerator::HOME_OUTPUT);
commands.insert(commands.end(), commands1.begin(), commands1.end()); commands.insert(commands.end(), commands1.begin(), commands1.end());
commands1.clear(); commands1.clear();
@ -433,7 +433,7 @@ void cmMakefileExecutableTargetGenerator::WriteExecutableRule(bool relink)
symlink += targetOutPath; symlink += targetOutPath;
commands1.push_back(symlink); commands1.push_back(symlink);
this->LocalGenerator->CreateCDCommand(commands1, this->LocalGenerator->CreateCDCommand(commands1,
this->Makefile->GetStartOutputDirectory(), this->Makefile->GetCurrentBinaryDirectory(),
cmLocalGenerator::HOME_OUTPUT); cmLocalGenerator::HOME_OUTPUT);
commands.insert(commands.end(), commands1.begin(), commands1.end()); commands.insert(commands.end(), commands1.begin(), commands1.end());
commands1.clear(); commands1.clear();

View File

@ -286,7 +286,7 @@ void cmMakefileLibraryTargetGenerator::WriteLibraryRules
} }
else if(relink) else if(relink)
{ {
outpath = this->Makefile->GetStartOutputDirectory(); outpath = this->Makefile->GetCurrentBinaryDirectory();
outpath += cmake::GetCMakeFilesDirectory(); outpath += cmake::GetCMakeFilesDirectory();
outpath += "/CMakeRelink.dir"; outpath += "/CMakeRelink.dir";
cmSystemTools::MakeDirectory(outpath.c_str()); cmSystemTools::MakeDirectory(outpath.c_str());
@ -445,7 +445,7 @@ void cmMakefileLibraryTargetGenerator::WriteLibraryRules
*this->Target, "target"); *this->Target, "target");
this->LocalGenerator->CreateCDCommand this->LocalGenerator->CreateCDCommand
(commands1, (commands1,
this->Makefile->GetStartOutputDirectory(), this->Makefile->GetCurrentBinaryDirectory(),
cmLocalGenerator::HOME_OUTPUT); cmLocalGenerator::HOME_OUTPUT);
commands.insert(commands.end(), commands1.begin(), commands1.end()); commands.insert(commands.end(), commands1.begin(), commands1.end());
commands1.clear(); commands1.clear();
@ -726,7 +726,7 @@ void cmMakefileLibraryTargetGenerator::WriteLibraryRules
} }
this->LocalGenerator->CreateCDCommand this->LocalGenerator->CreateCDCommand
(commands1, (commands1,
this->Makefile->GetStartOutputDirectory(), this->Makefile->GetCurrentBinaryDirectory(),
cmLocalGenerator::HOME_OUTPUT); cmLocalGenerator::HOME_OUTPUT);
commands.insert(commands.end(), commands1.begin(), commands1.end()); commands.insert(commands.end(), commands1.begin(), commands1.end());
commands1.clear(); commands1.clear();
@ -743,7 +743,7 @@ void cmMakefileLibraryTargetGenerator::WriteLibraryRules
symlink += targetOutPath; symlink += targetOutPath;
commands1.push_back(symlink); commands1.push_back(symlink);
this->LocalGenerator->CreateCDCommand(commands1, this->LocalGenerator->CreateCDCommand(commands1,
this->Makefile->GetStartOutputDirectory(), this->Makefile->GetCurrentBinaryDirectory(),
cmLocalGenerator::HOME_OUTPUT); cmLocalGenerator::HOME_OUTPUT);
commands.insert(commands.end(), commands1.begin(), commands1.end()); commands.insert(commands.end(), commands1.begin(), commands1.end());
commands1.clear(); commands1.clear();

View File

@ -741,7 +741,7 @@ cmMakefileTargetGenerator
this->LocalGenerator->ExpandRuleVariables(compileCommand, vars); this->LocalGenerator->ExpandRuleVariables(compileCommand, vars);
std::string workingDirectory = std::string workingDirectory =
this->LocalGenerator->Convert( this->LocalGenerator->Convert(
this->Makefile->GetStartOutputDirectory(), cmLocalGenerator::FULL); this->Makefile->GetCurrentBinaryDirectory(), cmLocalGenerator::FULL);
compileCommand.replace(compileCommand.find(langFlags), compileCommand.replace(compileCommand.find(langFlags),
langFlags.size(), this->GetFlags(lang)); langFlags.size(), this->GetFlags(lang));
std::string langDefines = std::string("$(") + lang + "_DEFINES)"; std::string langDefines = std::string("$(") + lang + "_DEFINES)";
@ -761,7 +761,7 @@ cmMakefileTargetGenerator
// Change the command working directory to the local build tree. // Change the command working directory to the local build tree.
this->LocalGenerator->CreateCDCommand this->LocalGenerator->CreateCDCommand
(compileCommands, (compileCommands,
this->Makefile->GetStartOutputDirectory(), this->Makefile->GetCurrentBinaryDirectory(),
cmLocalGenerator::HOME_OUTPUT); cmLocalGenerator::HOME_OUTPUT);
commands.insert(commands.end(), commands.insert(commands.end(),
compileCommands.begin(), compileCommands.end()); compileCommands.begin(), compileCommands.end());
@ -834,7 +834,7 @@ cmMakefileTargetGenerator
this->LocalGenerator->CreateCDCommand this->LocalGenerator->CreateCDCommand
(preprocessCommands, (preprocessCommands,
this->Makefile->GetStartOutputDirectory(), this->Makefile->GetCurrentBinaryDirectory(),
cmLocalGenerator::HOME_OUTPUT); cmLocalGenerator::HOME_OUTPUT);
commands.insert(commands.end(), commands.insert(commands.end(),
preprocessCommands.begin(), preprocessCommands.begin(),
@ -891,7 +891,7 @@ cmMakefileTargetGenerator
this->LocalGenerator->CreateCDCommand this->LocalGenerator->CreateCDCommand
(assemblyCommands, (assemblyCommands,
this->Makefile->GetStartOutputDirectory(), this->Makefile->GetCurrentBinaryDirectory(),
cmLocalGenerator::HOME_OUTPUT); cmLocalGenerator::HOME_OUTPUT);
commands.insert(commands.end(), commands.insert(commands.end(),
assemblyCommands.begin(), assemblyCommands.begin(),
@ -992,7 +992,7 @@ void cmMakefileTargetGenerator::WriteTargetCleanRules()
*this->Target); *this->Target);
this->LocalGenerator->CreateCDCommand this->LocalGenerator->CreateCDCommand
(commands, (commands,
this->Makefile->GetStartOutputDirectory(), this->Makefile->GetCurrentBinaryDirectory(),
cmLocalGenerator::HOME_OUTPUT); cmLocalGenerator::HOME_OUTPUT);
// Write the rule. // Write the rule.
@ -1139,7 +1139,7 @@ void cmMakefileTargetGenerator::WriteTargetDependRules()
{ {
cmMakefile* mf = linkee->GetMakefile(); cmMakefile* mf = linkee->GetMakefile();
cmLocalGenerator* lg = mf->GetLocalGenerator(); cmLocalGenerator* lg = mf->GetLocalGenerator();
std::string di = mf->GetStartOutputDirectory(); std::string di = mf->GetCurrentBinaryDirectory();
di += "/"; di += "/";
di += lg->GetTargetDirectory(*linkee); di += lg->GetTargetDirectory(*linkee);
di += "/DependInfo.cmake"; di += "/DependInfo.cmake";
@ -1199,13 +1199,13 @@ void cmMakefileTargetGenerator::WriteTargetDependRules()
<< this->Convert(this->Makefile->GetHomeDirectory(), << this->Convert(this->Makefile->GetHomeDirectory(),
cmLocalGenerator::FULL, cmLocalGenerator::SHELL) cmLocalGenerator::FULL, cmLocalGenerator::SHELL)
<< " " << " "
<< this->Convert(this->Makefile->GetStartDirectory(), << this->Convert(this->Makefile->GetCurrentSourceDirectory(),
cmLocalGenerator::FULL, cmLocalGenerator::SHELL) cmLocalGenerator::FULL, cmLocalGenerator::SHELL)
<< " " << " "
<< this->Convert(this->Makefile->GetHomeOutputDirectory(), << this->Convert(this->Makefile->GetHomeOutputDirectory(),
cmLocalGenerator::FULL, cmLocalGenerator::SHELL) cmLocalGenerator::FULL, cmLocalGenerator::SHELL)
<< " " << " "
<< this->Convert(this->Makefile->GetStartOutputDirectory(), << this->Convert(this->Makefile->GetCurrentBinaryDirectory(),
cmLocalGenerator::FULL, cmLocalGenerator::SHELL) cmLocalGenerator::FULL, cmLocalGenerator::SHELL)
<< " " << " "
<< this->Convert(this->InfoFileNameFull, << this->Convert(this->InfoFileNameFull,

View File

@ -45,7 +45,8 @@ cmNinjaTargetGenerator::New(cmGeneratorTarget* target)
// (i.e. top-level) directory. CMake creates copies of these targets // (i.e. top-level) directory. CMake creates copies of these targets
// in every directory, which we don't need. // in every directory, which we don't need.
cmMakefile *mf = target->Target->GetMakefile(); cmMakefile *mf = target->Target->GetMakefile();
if (strcmp(mf->GetStartDirectory(), mf->GetHomeDirectory()) == 0) if (strcmp(mf->GetCurrentSourceDirectory(),
mf->GetHomeDirectory()) == 0)
return new cmNinjaUtilityTargetGenerator(target); return new cmNinjaUtilityTargetGenerator(target);
// else fallthrough // else fallthrough
} }

View File

@ -192,7 +192,7 @@ bool cmOutputRequiredFilesCommand
// compute the list of files // compute the list of files
cmLBDepend md; cmLBDepend md;
md.SetMakefile(this->Makefile); md.SetMakefile(this->Makefile);
md.AddSearchPath(this->Makefile->GetStartDirectory()); md.AddSearchPath(this->Makefile->GetCurrentSourceDirectory());
// find the depends for a file // find the depends for a file
const cmDependInformation *info = md.FindDependencies(this->File.c_str()); const cmDependInformation *info = md.FindDependencies(this->File.c_str());
if (info) if (info)

View File

@ -1199,9 +1199,9 @@ static cmGlobalGenerator* CreateGlobalGenerator(cmake* cm,
cmLocalGenerator* lg = gg->CreateLocalGenerator(); cmLocalGenerator* lg = gg->CreateLocalGenerator();
lg->GetMakefile()->SetHomeOutputDirectory(targetDirectory); lg->GetMakefile()->SetHomeOutputDirectory(targetDirectory);
lg->GetMakefile()->SetStartOutputDirectory(targetDirectory); lg->GetMakefile()->SetCurrentBinaryDirectory(targetDirectory);
lg->GetMakefile()->SetHomeDirectory(targetDirectory); lg->GetMakefile()->SetHomeDirectory(targetDirectory);
lg->GetMakefile()->SetStartDirectory(targetDirectory); lg->GetMakefile()->SetCurrentSourceDirectory(targetDirectory);
gg->SetCurrentLocalGenerator(lg); gg->SetCurrentLocalGenerator(lg);
return gg; return gg;

View File

@ -1918,8 +1918,8 @@ void cmTarget::AppendBuildInterfaceIncludes()
if (this->Makefile->IsOn("CMAKE_INCLUDE_CURRENT_DIR_IN_INTERFACE")) if (this->Makefile->IsOn("CMAKE_INCLUDE_CURRENT_DIR_IN_INTERFACE"))
{ {
const char *binDir = this->Makefile->GetStartOutputDirectory(); const char *binDir = this->Makefile->GetCurrentBinaryDirectory();
const char *srcDir = this->Makefile->GetStartDirectory(); const char *srcDir = this->Makefile->GetCurrentSourceDirectory();
const std::string dirs = std::string(binDir ? binDir : "") const std::string dirs = std::string(binDir ? binDir : "")
+ std::string(binDir ? ";" : "") + std::string(binDir ? ";" : "")
+ std::string(srcDir ? srcDir : ""); + std::string(srcDir ? srcDir : "");
@ -4542,7 +4542,7 @@ bool cmTarget::ComputeOutputDir(const std::string& config,
// specified as a relative path. Treat a relative path as // specified as a relative path. Treat a relative path as
// relative to the current output directory for this makefile. // relative to the current output directory for this makefile.
out = (cmSystemTools::CollapseFullPath out = (cmSystemTools::CollapseFullPath
(out, this->Makefile->GetStartOutputDirectory())); (out, this->Makefile->GetCurrentBinaryDirectory()));
// The generator may add the configuration's subdirectory. // The generator may add the configuration's subdirectory.
if(!conf.empty()) if(!conf.empty())
@ -4608,7 +4608,7 @@ bool cmTarget::ComputePDBOutputDir(const std::string& kind,
// specified as a relative path. Treat a relative path as // specified as a relative path. Treat a relative path as
// relative to the current output directory for this makefile. // relative to the current output directory for this makefile.
out = (cmSystemTools::CollapseFullPath out = (cmSystemTools::CollapseFullPath
(out, this->Makefile->GetStartOutputDirectory())); (out, this->Makefile->GetCurrentBinaryDirectory()));
// The generator may add the configuration's subdirectory. // The generator may add the configuration's subdirectory.
if(!conf.empty()) if(!conf.empty())

View File

@ -47,7 +47,8 @@ std::string cmTargetIncludeDirectoriesCommand
{ {
std::string dirs; std::string dirs;
std::string sep; std::string sep;
std::string prefix = this->Makefile->GetStartDirectory() + std::string("/"); std::string prefix =
this->Makefile->GetCurrentSourceDirectory() + std::string("/");
for(std::vector<std::string>::const_iterator it = content.begin(); for(std::vector<std::string>::const_iterator it = content.begin();
it != content.end(); ++it) it != content.end(); ++it)
{ {

View File

@ -194,7 +194,7 @@ cmVisualStudio10TargetGenerator(cmTarget* target,
this->BuildFileStream = 0; this->BuildFileStream = 0;
this->IsMissingFiles = false; this->IsMissingFiles = false;
this->DefaultArtifactDir = this->DefaultArtifactDir =
this->Makefile->GetStartOutputDirectory() + std::string("/") + this->Makefile->GetCurrentBinaryDirectory() + std::string("/") +
this->LocalGenerator->GetTargetDirectory(*this->Target); this->LocalGenerator->GetTargetDirectory(*this->Target);
} }
@ -297,7 +297,7 @@ void cmVisualStudio10TargetGenerator::Generate()
} }
} }
cmMakefile* mf = this->Target->GetMakefile(); cmMakefile* mf = this->Target->GetMakefile();
std::string path = mf->GetStartOutputDirectory(); std::string path = mf->GetCurrentBinaryDirectory();
path += "/"; path += "/";
path += this->Name; path += this->Name;
path += ".vcxproj"; path += ".vcxproj";
@ -969,7 +969,7 @@ void cmVisualStudio10TargetGenerator::WriteGroups()
this->AddMissingSourceGroups(groupsUsed, sourceGroups); this->AddMissingSourceGroups(groupsUsed, sourceGroups);
// Write out group file // Write out group file
std::string path = this->Makefile->GetStartOutputDirectory(); std::string path = this->Makefile->GetCurrentBinaryDirectory();
path += "/"; path += "/";
path += this->Name; path += this->Name;
path += ".vcxproj.filters"; path += ".vcxproj.filters";
@ -2714,7 +2714,7 @@ void cmVisualStudio10TargetGenerator::WriteProjectReferences()
} }
else else
{ {
path = mf->GetStartOutputDirectory(); path = mf->GetCurrentBinaryDirectory();
path += "/"; path += "/";
path += dt->GetName(); path += dt->GetName();
path += ".vcxproj"; path += ".vcxproj";
@ -2978,7 +2978,7 @@ void cmVisualStudio10TargetGenerator::WriteMissingFilesWP80()
// For WP80, the manifest needs to be in the same folder as the project // For WP80, the manifest needs to be in the same folder as the project
// this can cause an overwrite problem if projects aren't organized in // this can cause an overwrite problem if projects aren't organized in
// folders // folders
std::string manifestFile = this->Makefile->GetStartOutputDirectory() + std::string manifestFile = this->Makefile->GetCurrentBinaryDirectory() +
std::string("/WMAppManifest.xml"); std::string("/WMAppManifest.xml");
std::string artifactDir = std::string artifactDir =
this->LocalGenerator->GetTargetDirectory(*this->Target); this->LocalGenerator->GetTargetDirectory(*this->Target);

View File

@ -418,9 +418,9 @@ bool cmake::FindPackage(const std::vector<std::string>& args)
// read in the list file to fill the cache // read in the list file to fill the cache
cmsys::auto_ptr<cmLocalGenerator> lg(gg->CreateLocalGenerator()); cmsys::auto_ptr<cmLocalGenerator> lg(gg->CreateLocalGenerator());
cmMakefile* mf = lg->GetMakefile(); cmMakefile* mf = lg->GetMakefile();
mf->SetStartOutputDirectory mf->SetCurrentBinaryDirectory
(cmSystemTools::GetCurrentWorkingDirectory()); (cmSystemTools::GetCurrentWorkingDirectory());
mf->SetStartDirectory mf->SetCurrentSourceDirectory
(cmSystemTools::GetCurrentWorkingDirectory()); (cmSystemTools::GetCurrentWorkingDirectory());
mf->SetArgcArgv(args); mf->SetArgcArgv(args);