cmMakefile: Rename GetCurrent{,Source}Directory.
Match the names used in cmake code.
This commit is contained in:
parent
b23cf06f86
commit
55d80d0a85
@ -346,7 +346,7 @@ void cmCTestScriptHandler::CreateCMake()
|
|||||||
this->CMake->SetProgressCallback(ctestScriptProgressCallback, this->CTest);
|
this->CMake->SetProgressCallback(ctestScriptProgressCallback, this->CTest);
|
||||||
|
|
||||||
// Set CMAKE_CURRENT_SOURCE_DIR and CMAKE_CURRENT_BINARY_DIR.
|
// Set CMAKE_CURRENT_SOURCE_DIR and CMAKE_CURRENT_BINARY_DIR.
|
||||||
// Also, some commands need Makefile->GetCurrentDirectory().
|
// Also, some commands need Makefile->GetCurrentSourceDirectory().
|
||||||
std::string cwd = cmSystemTools::GetCurrentWorkingDirectory();
|
std::string cwd = cmSystemTools::GetCurrentWorkingDirectory();
|
||||||
this->Makefile->SetStartDirectory(cwd);
|
this->Makefile->SetStartDirectory(cwd);
|
||||||
this->Makefile->SetStartOutputDirectory(cwd);
|
this->Makefile->SetStartOutputDirectory(cwd);
|
||||||
|
@ -57,7 +57,7 @@ bool cmAddSubDirectoryCommand::InitialPass
|
|||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
srcPath = this->Makefile->GetCurrentDirectory();
|
srcPath = this->Makefile->GetCurrentSourceDirectory();
|
||||||
srcPath += "/";
|
srcPath += "/";
|
||||||
srcPath += srcArg;
|
srcPath += srcArg;
|
||||||
}
|
}
|
||||||
@ -79,12 +79,12 @@ bool cmAddSubDirectoryCommand::InitialPass
|
|||||||
// not a subdirectory of the current directory then it is an
|
// not a subdirectory of the current directory then it is an
|
||||||
// error.
|
// error.
|
||||||
if(!cmSystemTools::IsSubDirectory(srcPath,
|
if(!cmSystemTools::IsSubDirectory(srcPath,
|
||||||
this->Makefile->GetCurrentDirectory()))
|
this->Makefile->GetCurrentSourceDirectory()))
|
||||||
{
|
{
|
||||||
std::ostringstream e;
|
std::ostringstream e;
|
||||||
e << "not given a binary directory but the given source directory "
|
e << "not given a binary directory but the given source directory "
|
||||||
<< "\"" << srcPath << "\" is not a subdirectory of \""
|
<< "\"" << srcPath << "\" is not a subdirectory of \""
|
||||||
<< this->Makefile->GetCurrentDirectory() << "\". "
|
<< this->Makefile->GetCurrentSourceDirectory() << "\". "
|
||||||
<< "When specifying an out-of-tree source a binary directory "
|
<< "When specifying an out-of-tree source a binary directory "
|
||||||
<< "must be explicitly specified.";
|
<< "must be explicitly specified.";
|
||||||
this->SetError(e.str());
|
this->SetError(e.str());
|
||||||
@ -93,7 +93,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->GetCurrentDirectory();
|
const char* src = this->Makefile->GetCurrentSourceDirectory();
|
||||||
const char* bin = this->Makefile->GetCurrentOutputDirectory();
|
const char* bin = this->Makefile->GetCurrentOutputDirectory();
|
||||||
size_t srcLen = strlen(src);
|
size_t srcLen = strlen(src);
|
||||||
size_t binLen = strlen(bin);
|
size_t binLen = strlen(bin);
|
||||||
|
@ -29,7 +29,7 @@ bool cmAuxSourceDirectoryCommand::InitialPass
|
|||||||
std::string tdir;
|
std::string tdir;
|
||||||
if(!cmSystemTools::FileIsFullPath(templateDirectory.c_str()))
|
if(!cmSystemTools::FileIsFullPath(templateDirectory.c_str()))
|
||||||
{
|
{
|
||||||
tdir = this->Makefile->GetCurrentDirectory();
|
tdir = this->Makefile->GetCurrentSourceDirectory();
|
||||||
tdir += "/";
|
tdir += "/";
|
||||||
tdir += templateDirectory;
|
tdir += templateDirectory;
|
||||||
}
|
}
|
||||||
|
@ -141,7 +141,7 @@ const char* CCONV cmGetStartOutputDirectory(void *arg)
|
|||||||
const char* CCONV cmGetCurrentDirectory(void *arg)
|
const char* CCONV cmGetCurrentDirectory(void *arg)
|
||||||
{
|
{
|
||||||
cmMakefile *mf = static_cast<cmMakefile *>(arg);
|
cmMakefile *mf = static_cast<cmMakefile *>(arg);
|
||||||
return mf->GetCurrentDirectory();
|
return mf->GetCurrentSourceDirectory();
|
||||||
}
|
}
|
||||||
const char* CCONV cmGetCurrentOutputDirectory(void *arg)
|
const char* CCONV cmGetCurrentOutputDirectory(void *arg)
|
||||||
{
|
{
|
||||||
|
@ -26,7 +26,7 @@ bool cmConfigureFileCommand
|
|||||||
const char* inFile = args[0].c_str();
|
const char* inFile = args[0].c_str();
|
||||||
if(!cmSystemTools::FileIsFullPath(inFile))
|
if(!cmSystemTools::FileIsFullPath(inFile))
|
||||||
{
|
{
|
||||||
this->InputFile = this->Makefile->GetCurrentDirectory();
|
this->InputFile = this->Makefile->GetCurrentSourceDirectory();
|
||||||
this->InputFile += "/";
|
this->InputFile += "/";
|
||||||
}
|
}
|
||||||
this->InputFile += inFile;
|
this->InputFile += inFile;
|
||||||
|
@ -81,7 +81,7 @@ void cmExtraQbsGenerator::AppendSubProject(cmGeneratedFileStream &fout,
|
|||||||
}
|
}
|
||||||
|
|
||||||
const std::string &relativePath = cmSystemTools::RelativePath(
|
const std::string &relativePath = cmSystemTools::RelativePath(
|
||||||
mk->GetHomeDirectory(), mk->GetCurrentDirectory());
|
mk->GetHomeDirectory(), mk->GetCurrentSourceDirectory());
|
||||||
fout << "\tProject {\n"
|
fout << "\tProject {\n"
|
||||||
<< "\t\tname:\"" << relativePath << "\"\n";
|
<< "\t\tname:\"" << relativePath << "\"\n";
|
||||||
this->AppendProduct(fout, lg);
|
this->AppendProduct(fout, lg);
|
||||||
|
@ -24,7 +24,7 @@ bool cmFLTKWrapUICommand
|
|||||||
}
|
}
|
||||||
|
|
||||||
// what is the current source dir
|
// what is the current source dir
|
||||||
std::string cdir = this->Makefile->GetCurrentDirectory();
|
std::string cdir = this->Makefile->GetCurrentSourceDirectory();
|
||||||
const char* fluid_exe =
|
const char* fluid_exe =
|
||||||
this->Makefile->GetRequiredDefinition("FLTK_FLUID_EXECUTABLE");
|
this->Makefile->GetRequiredDefinition("FLTK_FLUID_EXECUTABLE");
|
||||||
|
|
||||||
|
@ -227,7 +227,7 @@ bool cmFileCommand::HandleWriteCommand(std::vector<std::string> const& args,
|
|||||||
std::string fileName = *i;
|
std::string fileName = *i;
|
||||||
if ( !cmsys::SystemTools::FileIsFullPath(i->c_str()) )
|
if ( !cmsys::SystemTools::FileIsFullPath(i->c_str()) )
|
||||||
{
|
{
|
||||||
fileName = this->Makefile->GetCurrentDirectory();
|
fileName = this->Makefile->GetCurrentSourceDirectory();
|
||||||
fileName += "/" + *i;
|
fileName += "/" + *i;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -309,7 +309,7 @@ bool cmFileCommand::HandleReadCommand(std::vector<std::string> const& args)
|
|||||||
std::string fileName = fileNameArg.GetString();
|
std::string fileName = fileNameArg.GetString();
|
||||||
if ( !cmsys::SystemTools::FileIsFullPath(fileName.c_str()) )
|
if ( !cmsys::SystemTools::FileIsFullPath(fileName.c_str()) )
|
||||||
{
|
{
|
||||||
fileName = this->Makefile->GetCurrentDirectory();
|
fileName = this->Makefile->GetCurrentSourceDirectory();
|
||||||
fileName += "/" + fileNameArg.GetString();
|
fileName += "/" + fileNameArg.GetString();
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -445,7 +445,7 @@ bool cmFileCommand::HandleStringsCommand(std::vector<std::string> const& args)
|
|||||||
std::string fileName = args[1];
|
std::string fileName = args[1];
|
||||||
if(!cmsys::SystemTools::FileIsFullPath(fileName.c_str()))
|
if(!cmsys::SystemTools::FileIsFullPath(fileName.c_str()))
|
||||||
{
|
{
|
||||||
fileName = this->Makefile->GetCurrentDirectory();
|
fileName = this->Makefile->GetCurrentSourceDirectory();
|
||||||
fileName += "/" + args[1];
|
fileName += "/" + args[1];
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -984,7 +984,7 @@ bool cmFileCommand::HandleGlobCommand(std::vector<std::string> const& args,
|
|||||||
cmsys::Glob::GlobMessages globMessages;
|
cmsys::Glob::GlobMessages globMessages;
|
||||||
if ( !cmsys::SystemTools::FileIsFullPath(i->c_str()) )
|
if ( !cmsys::SystemTools::FileIsFullPath(i->c_str()) )
|
||||||
{
|
{
|
||||||
std::string expr = this->Makefile->GetCurrentDirectory();
|
std::string expr = this->Makefile->GetCurrentSourceDirectory();
|
||||||
// Handle script mode
|
// Handle script mode
|
||||||
if (!expr.empty())
|
if (!expr.empty())
|
||||||
{
|
{
|
||||||
@ -1091,7 +1091,7 @@ bool cmFileCommand::HandleMakeDirectoryCommand(
|
|||||||
const std::string* cdir = &(*i);
|
const std::string* cdir = &(*i);
|
||||||
if ( !cmsys::SystemTools::FileIsFullPath(i->c_str()) )
|
if ( !cmsys::SystemTools::FileIsFullPath(i->c_str()) )
|
||||||
{
|
{
|
||||||
expr = this->Makefile->GetCurrentDirectory();
|
expr = this->Makefile->GetCurrentSourceDirectory();
|
||||||
expr += "/" + *i;
|
expr += "/" + *i;
|
||||||
cdir = &expr;
|
cdir = &expr;
|
||||||
}
|
}
|
||||||
@ -1556,7 +1556,7 @@ bool cmFileCopier::CheckValue(std::string const& arg)
|
|||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
std::string file = this->Makefile->GetCurrentDirectory();
|
std::string file = this->Makefile->GetCurrentSourceDirectory();
|
||||||
file += "/" + arg;
|
file += "/" + arg;
|
||||||
this->Files.push_back(file);
|
this->Files.push_back(file);
|
||||||
}
|
}
|
||||||
@ -2658,13 +2658,13 @@ bool cmFileCommand::HandleRename(std::vector<std::string> const& args)
|
|||||||
std::string oldname = args[1];
|
std::string oldname = args[1];
|
||||||
if(!cmsys::SystemTools::FileIsFullPath(oldname.c_str()))
|
if(!cmsys::SystemTools::FileIsFullPath(oldname.c_str()))
|
||||||
{
|
{
|
||||||
oldname = this->Makefile->GetCurrentDirectory();
|
oldname = this->Makefile->GetCurrentSourceDirectory();
|
||||||
oldname += "/" + args[1];
|
oldname += "/" + args[1];
|
||||||
}
|
}
|
||||||
std::string newname = args[2];
|
std::string newname = args[2];
|
||||||
if(!cmsys::SystemTools::FileIsFullPath(newname.c_str()))
|
if(!cmsys::SystemTools::FileIsFullPath(newname.c_str()))
|
||||||
{
|
{
|
||||||
newname = this->Makefile->GetCurrentDirectory();
|
newname = this->Makefile->GetCurrentSourceDirectory();
|
||||||
newname += "/" + args[2];
|
newname += "/" + args[2];
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -2698,7 +2698,7 @@ bool cmFileCommand::HandleRemove(std::vector<std::string> const& args,
|
|||||||
std::string fileName = *i;
|
std::string fileName = *i;
|
||||||
if(!cmsys::SystemTools::FileIsFullPath(fileName.c_str()))
|
if(!cmsys::SystemTools::FileIsFullPath(fileName.c_str()))
|
||||||
{
|
{
|
||||||
fileName = this->Makefile->GetCurrentDirectory();
|
fileName = this->Makefile->GetCurrentSourceDirectory();
|
||||||
fileName += "/" + *i;
|
fileName += "/" + *i;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -3743,7 +3743,7 @@ bool cmFileCommand::HandleLockCommand(
|
|||||||
|
|
||||||
if (!cmsys::SystemTools::FileIsFullPath(path))
|
if (!cmsys::SystemTools::FileIsFullPath(path))
|
||||||
{
|
{
|
||||||
path = this->Makefile->GetCurrentDirectory() + ("/" + path);
|
path = this->Makefile->GetCurrentSourceDirectory() + ("/" + path);
|
||||||
}
|
}
|
||||||
|
|
||||||
// Unify path (remove '//', '/../', ...)
|
// Unify path (remove '//', '/../', ...)
|
||||||
|
@ -663,7 +663,7 @@ bool cmFindPackageCommand::HandlePackageMode()
|
|||||||
if(!cmSystemTools::FileIsFullPath(dir.c_str()))
|
if(!cmSystemTools::FileIsFullPath(dir.c_str()))
|
||||||
{
|
{
|
||||||
dir = "/" + dir;
|
dir = "/" + dir;
|
||||||
dir = this->Makefile->GetCurrentDirectory() + dir;
|
dir = this->Makefile->GetCurrentSourceDirectory() + dir;
|
||||||
}
|
}
|
||||||
// The file location was cached. Look for the correct file.
|
// The file location was cached. Look for the correct file.
|
||||||
std::string file;
|
std::string file;
|
||||||
|
@ -97,7 +97,7 @@ bool cmGetFilenameComponentCommand
|
|||||||
// If the path given is relative evaluate it relative to the
|
// If the path given is relative evaluate it relative to the
|
||||||
// current source directory.
|
// current source directory.
|
||||||
result = cmSystemTools::CollapseFullPath(
|
result = cmSystemTools::CollapseFullPath(
|
||||||
filename, this->Makefile->GetCurrentDirectory());
|
filename, this->Makefile->GetCurrentSourceDirectory());
|
||||||
if(args[2] == "REALPATH")
|
if(args[2] == "REALPATH")
|
||||||
{
|
{
|
||||||
// Resolve symlinks if possible
|
// Resolve symlinks if possible
|
||||||
|
@ -255,7 +255,7 @@ bool cmGetPropertyCommand::HandleDirectoryMode()
|
|||||||
std::string dir = this->Name;
|
std::string dir = this->Name;
|
||||||
if(!cmSystemTools::FileIsFullPath(dir.c_str()))
|
if(!cmSystemTools::FileIsFullPath(dir.c_str()))
|
||||||
{
|
{
|
||||||
dir = this->Makefile->GetCurrentDirectory();
|
dir = this->Makefile->GetCurrentSourceDirectory();
|
||||||
dir += "/";
|
dir += "/";
|
||||||
dir += this->Name;
|
dir += this->Name;
|
||||||
}
|
}
|
||||||
|
@ -1567,7 +1567,8 @@ void cmGlobalGenerator::CheckLocalGenerators()
|
|||||||
text += "\n linked by target \"";
|
text += "\n linked by target \"";
|
||||||
text += l->second.GetName();
|
text += l->second.GetName();
|
||||||
text += "\" in directory ";
|
text += "\" in directory ";
|
||||||
text+=this->LocalGenerators[i]->GetMakefile()->GetCurrentDirectory();
|
text+=this->LocalGenerators[i]->GetMakefile()
|
||||||
|
->GetCurrentSourceDirectory();
|
||||||
notFoundMap[varName] = text;
|
notFoundMap[varName] = text;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -1597,7 +1598,7 @@ void cmGlobalGenerator::CheckLocalGenerators()
|
|||||||
std::string text = notFoundMap[varName];
|
std::string text = notFoundMap[varName];
|
||||||
text += "\n used as include directory in directory ";
|
text += "\n used as include directory in directory ";
|
||||||
text += this->LocalGenerators[i]
|
text += this->LocalGenerators[i]
|
||||||
->GetMakefile()->GetCurrentDirectory();
|
->GetMakefile()->GetCurrentSourceDirectory();
|
||||||
notFoundMap[varName] = text;
|
notFoundMap[varName] = text;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -407,7 +407,7 @@ void cmGlobalXCodeGenerator::SetGenerationRoot(cmLocalGenerator* root)
|
|||||||
{
|
{
|
||||||
this->CurrentProject = root->GetMakefile()->GetProjectName();
|
this->CurrentProject = root->GetMakefile()->GetProjectName();
|
||||||
this->SetCurrentLocalGenerator(root);
|
this->SetCurrentLocalGenerator(root);
|
||||||
cmSystemTools::SplitPath(this->CurrentMakefile->GetCurrentDirectory(),
|
cmSystemTools::SplitPath(this->CurrentMakefile->GetCurrentSourceDirectory(),
|
||||||
this->ProjectSourceDirectoryComponents);
|
this->ProjectSourceDirectoryComponents);
|
||||||
cmSystemTools::SplitPath(this->CurrentMakefile->GetCurrentOutputDirectory(),
|
cmSystemTools::SplitPath(this->CurrentMakefile->GetCurrentOutputDirectory(),
|
||||||
this->ProjectOutputDirectoryComponents);
|
this->ProjectOutputDirectoryComponents);
|
||||||
@ -3342,7 +3342,7 @@ bool cmGlobalXCodeGenerator
|
|||||||
// Point Xcode at the top of the source tree.
|
// Point Xcode at the top of the source tree.
|
||||||
{
|
{
|
||||||
std::string pdir =
|
std::string pdir =
|
||||||
this->RelativeToBinary(root->GetMakefile()->GetCurrentDirectory());
|
this->RelativeToBinary(root->GetMakefile()->GetCurrentSourceDirectory());
|
||||||
this->RootObject->AddAttribute("projectDirPath",
|
this->RootObject->AddAttribute("projectDirPath",
|
||||||
this->CreateString(pdir.c_str()));
|
this->CreateString(pdir.c_str()));
|
||||||
this->RootObject->AddAttribute("projectRoot", this->CreateString(""));
|
this->RootObject->AddAttribute("projectRoot", this->CreateString(""));
|
||||||
|
@ -163,7 +163,7 @@ bool cmInstallCommand::HandleScriptMode(std::vector<std::string> const& args)
|
|||||||
std::string script = args[i];
|
std::string script = args[i];
|
||||||
if(!cmSystemTools::FileIsFullPath(script.c_str()))
|
if(!cmSystemTools::FileIsFullPath(script.c_str()))
|
||||||
{
|
{
|
||||||
script = this->Makefile->GetCurrentDirectory();
|
script = this->Makefile->GetCurrentSourceDirectory();
|
||||||
script += "/";
|
script += "/";
|
||||||
script += args[i];
|
script += args[i];
|
||||||
}
|
}
|
||||||
@ -1093,7 +1093,7 @@ cmInstallCommand::HandleDirectoryMode(std::vector<std::string> const& args)
|
|||||||
std::string dir = args[i];
|
std::string dir = args[i];
|
||||||
if(!cmSystemTools::FileIsFullPath(dir.c_str()))
|
if(!cmSystemTools::FileIsFullPath(dir.c_str()))
|
||||||
{
|
{
|
||||||
dir = this->Makefile->GetCurrentDirectory();
|
dir = this->Makefile->GetCurrentSourceDirectory();
|
||||||
dir += "/";
|
dir += "/";
|
||||||
dir += args[i];
|
dir += args[i];
|
||||||
}
|
}
|
||||||
@ -1376,7 +1376,7 @@ bool cmInstallCommand::MakeFilesFullPath(const char* modeName,
|
|||||||
std::string::size_type gpos = cmGeneratorExpression::Find(file);
|
std::string::size_type gpos = cmGeneratorExpression::Find(file);
|
||||||
if(gpos != 0 && !cmSystemTools::FileIsFullPath(file.c_str()))
|
if(gpos != 0 && !cmSystemTools::FileIsFullPath(file.c_str()))
|
||||||
{
|
{
|
||||||
file = this->Makefile->GetCurrentDirectory();
|
file = this->Makefile->GetCurrentSourceDirectory();
|
||||||
file += "/";
|
file += "/";
|
||||||
file += *fileIt;
|
file += *fileIt;
|
||||||
}
|
}
|
||||||
|
@ -95,7 +95,7 @@ void cmInstallFilesCommand::FinalPass()
|
|||||||
{
|
{
|
||||||
std::vector<std::string> files;
|
std::vector<std::string> files;
|
||||||
std::string regex = this->FinalArgs[0];
|
std::string regex = this->FinalArgs[0];
|
||||||
cmSystemTools::Glob(this->Makefile->GetCurrentDirectory(),
|
cmSystemTools::Glob(this->Makefile->GetCurrentSourceDirectory(),
|
||||||
regex, files);
|
regex, files);
|
||||||
|
|
||||||
std::vector<std::string>::iterator s = files.begin();
|
std::vector<std::string>::iterator s = files.begin();
|
||||||
@ -155,7 +155,7 @@ std::string cmInstallFilesCommand::FindInstallSource(const char* name) const
|
|||||||
std::string tb = this->Makefile->GetCurrentOutputDirectory();
|
std::string tb = this->Makefile->GetCurrentOutputDirectory();
|
||||||
tb += "/";
|
tb += "/";
|
||||||
tb += name;
|
tb += name;
|
||||||
std::string ts = this->Makefile->GetCurrentDirectory();
|
std::string ts = this->Makefile->GetCurrentSourceDirectory();
|
||||||
ts += "/";
|
ts += "/";
|
||||||
ts += name;
|
ts += name;
|
||||||
|
|
||||||
|
@ -63,7 +63,7 @@ void cmInstallProgramsCommand::FinalPass()
|
|||||||
else // reg exp list
|
else // reg exp list
|
||||||
{
|
{
|
||||||
std::vector<std::string> programs;
|
std::vector<std::string> programs;
|
||||||
cmSystemTools::Glob(this->Makefile->GetCurrentDirectory(),
|
cmSystemTools::Glob(this->Makefile->GetCurrentSourceDirectory(),
|
||||||
this->FinalArgs[0], programs);
|
this->FinalArgs[0], programs);
|
||||||
|
|
||||||
std::vector<std::string>::iterator s = programs.begin();
|
std::vector<std::string>::iterator s = programs.begin();
|
||||||
@ -118,7 +118,7 @@ std::string cmInstallProgramsCommand
|
|||||||
std::string tb = this->Makefile->GetCurrentOutputDirectory();
|
std::string tb = this->Makefile->GetCurrentOutputDirectory();
|
||||||
tb += "/";
|
tb += "/";
|
||||||
tb += name;
|
tb += name;
|
||||||
std::string ts = this->Makefile->GetCurrentDirectory();
|
std::string ts = this->Makefile->GetCurrentSourceDirectory();
|
||||||
ts += "/";
|
ts += "/";
|
||||||
ts += name;
|
ts += name;
|
||||||
|
|
||||||
|
@ -438,7 +438,8 @@ void cmLocalGenerator::GenerateInstallRules()
|
|||||||
|
|
||||||
// Write the header.
|
// Write the header.
|
||||||
fout << "# Install script for directory: "
|
fout << "# Install script for directory: "
|
||||||
<< this->Makefile->GetCurrentDirectory() << std::endl << std::endl;
|
<< this->Makefile->GetCurrentSourceDirectory()
|
||||||
|
<< std::endl << std::endl;
|
||||||
fout << "# Set the install prefix" << std::endl
|
fout << "# Set the install prefix" << std::endl
|
||||||
<< "if(NOT DEFINED CMAKE_INSTALL_PREFIX)" << std::endl
|
<< "if(NOT DEFINED CMAKE_INSTALL_PREFIX)" << std::endl
|
||||||
<< " set(CMAKE_INSTALL_PREFIX \"" << prefix << "\")" << std::endl
|
<< " set(CMAKE_INSTALL_PREFIX \"" << prefix << "\")" << std::endl
|
||||||
@ -2159,7 +2160,7 @@ bool cmLocalGenerator::GetRealDependency(const std::string& inName,
|
|||||||
|
|
||||||
// Treat the name as relative to the source directory in which it
|
// Treat the name as relative to the source directory in which it
|
||||||
// was given.
|
// was given.
|
||||||
dep = this->Makefile->GetCurrentDirectory();
|
dep = this->Makefile->GetCurrentSourceDirectory();
|
||||||
dep += "/";
|
dep += "/";
|
||||||
dep += inName;
|
dep += inName;
|
||||||
return true;
|
return true;
|
||||||
|
@ -269,7 +269,7 @@ void cmMakefile::IssueMessage(cmake::MessageType t,
|
|||||||
if(this->ListFileStack.empty())
|
if(this->ListFileStack.empty())
|
||||||
{
|
{
|
||||||
// We are not processing the project. Add the directory-level context.
|
// We are not processing the project. Add the directory-level context.
|
||||||
lfc.FilePath = this->GetCurrentDirectory();
|
lfc.FilePath = this->GetCurrentSourceDirectory();
|
||||||
lfc.FilePath += "/CMakeLists.txt";
|
lfc.FilePath += "/CMakeLists.txt";
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
@ -1622,7 +1622,7 @@ void cmMakefile::ConfigureSubDirectory(cmLocalGenerator *lg2)
|
|||||||
if (this->GetCMakeInstance()->GetDebugOutput())
|
if (this->GetCMakeInstance()->GetDebugOutput())
|
||||||
{
|
{
|
||||||
std::string msg=" Entering ";
|
std::string msg=" Entering ";
|
||||||
msg += lg2->GetMakefile()->GetCurrentDirectory();
|
msg += lg2->GetMakefile()->GetCurrentSourceDirectory();
|
||||||
cmSystemTools::Message(msg.c_str());
|
cmSystemTools::Message(msg.c_str());
|
||||||
}
|
}
|
||||||
// finally configure the subdir
|
// finally configure the subdir
|
||||||
@ -1630,7 +1630,7 @@ void cmMakefile::ConfigureSubDirectory(cmLocalGenerator *lg2)
|
|||||||
if (this->GetCMakeInstance()->GetDebugOutput())
|
if (this->GetCMakeInstance()->GetDebugOutput())
|
||||||
{
|
{
|
||||||
std::string msg=" Returning to ";
|
std::string msg=" Returning to ";
|
||||||
msg += this->GetCurrentDirectory();
|
msg += this->GetCurrentSourceDirectory();
|
||||||
cmSystemTools::Message(msg.c_str());
|
cmSystemTools::Message(msg.c_str());
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -4039,7 +4039,7 @@ void cmMakefile::SetProperty(const std::string& prop, const char* value)
|
|||||||
if ( prop == "ADDITIONAL_MAKE_CLEAN_FILES" )
|
if ( prop == "ADDITIONAL_MAKE_CLEAN_FILES" )
|
||||||
{
|
{
|
||||||
// This property is not inherrited
|
// This property is not inherrited
|
||||||
if ( strcmp(this->GetCurrentDirectory(),
|
if ( strcmp(this->GetCurrentSourceDirectory(),
|
||||||
this->GetStartDirectory()) != 0 )
|
this->GetStartDirectory()) != 0 )
|
||||||
{
|
{
|
||||||
return;
|
return;
|
||||||
@ -4307,7 +4307,7 @@ void cmMakefile::AddCMakeDependFilesFromUser()
|
|||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
std::string f = this->GetCurrentDirectory();
|
std::string f = this->GetCurrentSourceDirectory();
|
||||||
f += "/";
|
f += "/";
|
||||||
f += *i;
|
f += *i;
|
||||||
this->AddCMakeDependFile(f);
|
this->AddCMakeDependFile(f);
|
||||||
@ -4588,7 +4588,7 @@ bool cmMakefile::EnforceUniqueName(std::string const& name, std::string& msg,
|
|||||||
default: break;
|
default: break;
|
||||||
}
|
}
|
||||||
e << "created in source directory \""
|
e << "created in source directory \""
|
||||||
<< existing->GetMakefile()->GetCurrentDirectory() << "\". "
|
<< existing->GetMakefile()->GetCurrentSourceDirectory() << "\". "
|
||||||
<< "See documentation for policy CMP0002 for more details.";
|
<< "See documentation for policy CMP0002 for more details.";
|
||||||
msg = e.str();
|
msg = e.str();
|
||||||
return false;
|
return false;
|
||||||
|
@ -484,7 +484,7 @@ public:
|
|||||||
}
|
}
|
||||||
//@}
|
//@}
|
||||||
|
|
||||||
const char* GetCurrentDirectory() const
|
const char* GetCurrentSourceDirectory() const
|
||||||
{
|
{
|
||||||
return this->cmStartDirectory.c_str();
|
return this->cmStartDirectory.c_str();
|
||||||
}
|
}
|
||||||
|
@ -33,7 +33,7 @@ bool cmProjectCommand
|
|||||||
"Value Computed by CMake", cmState::STATIC);
|
"Value Computed by CMake", cmState::STATIC);
|
||||||
this->Makefile->AddCacheDefinition
|
this->Makefile->AddCacheDefinition
|
||||||
(srcdir,
|
(srcdir,
|
||||||
this->Makefile->GetCurrentDirectory(),
|
this->Makefile->GetCurrentSourceDirectory(),
|
||||||
"Value Computed by CMake", cmState::STATIC);
|
"Value Computed by CMake", cmState::STATIC);
|
||||||
|
|
||||||
bindir = "PROJECT_BINARY_DIR";
|
bindir = "PROJECT_BINARY_DIR";
|
||||||
@ -42,7 +42,7 @@ bool cmProjectCommand
|
|||||||
this->Makefile->AddDefinition(bindir,
|
this->Makefile->AddDefinition(bindir,
|
||||||
this->Makefile->GetCurrentOutputDirectory());
|
this->Makefile->GetCurrentOutputDirectory());
|
||||||
this->Makefile->AddDefinition(srcdir,
|
this->Makefile->AddDefinition(srcdir,
|
||||||
this->Makefile->GetCurrentDirectory());
|
this->Makefile->GetCurrentSourceDirectory());
|
||||||
|
|
||||||
this->Makefile->AddDefinition("PROJECT_NAME", args[0].c_str());
|
this->Makefile->AddDefinition("PROJECT_NAME", args[0].c_str());
|
||||||
|
|
||||||
|
@ -66,7 +66,7 @@ bool cmQTWrapCPPCommand::InitialPass(std::vector<std::string> const& args,
|
|||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
hname = this->Makefile->GetCurrentDirectory();
|
hname = this->Makefile->GetCurrentSourceDirectory();
|
||||||
}
|
}
|
||||||
hname += "/";
|
hname += "/";
|
||||||
hname += *j;
|
hname += *j;
|
||||||
|
@ -73,7 +73,7 @@ bool cmQTWrapUICommand::InitialPass(std::vector<std::string> const& args,
|
|||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
uiName = this->Makefile->GetCurrentDirectory();
|
uiName = this->Makefile->GetCurrentSourceDirectory();
|
||||||
}
|
}
|
||||||
uiName += "/";
|
uiName += "/";
|
||||||
uiName += *j;
|
uiName += *j;
|
||||||
|
@ -86,7 +86,7 @@ void cmSearchPath::AddUserPath(const std::string& path)
|
|||||||
for(std::vector<std::string>::const_iterator p = outPaths.begin();
|
for(std::vector<std::string>::const_iterator p = outPaths.begin();
|
||||||
p != outPaths.end(); ++p)
|
p != outPaths.end(); ++p)
|
||||||
{
|
{
|
||||||
this->AddPathInternal(*p, this->FC->Makefile->GetCurrentDirectory());
|
this->AddPathInternal(*p, this->FC->Makefile->GetCurrentSourceDirectory());
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -104,7 +104,8 @@ void cmSearchPath::AddCMakePath(const std::string& variable)
|
|||||||
for(std::vector<std::string>::const_iterator p = expanded.begin();
|
for(std::vector<std::string>::const_iterator p = expanded.begin();
|
||||||
p!= expanded.end(); ++p)
|
p!= expanded.end(); ++p)
|
||||||
{
|
{
|
||||||
this->AddPathInternal(*p, this->FC->Makefile->GetCurrentDirectory());
|
this->AddPathInternal(*p,
|
||||||
|
this->FC->Makefile->GetCurrentSourceDirectory());
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -132,7 +133,8 @@ void cmSearchPath::AddCMakePrefixPath(const std::string& variable)
|
|||||||
std::vector<std::string> expanded;
|
std::vector<std::string> expanded;
|
||||||
cmSystemTools::ExpandListArgument(value, expanded);
|
cmSystemTools::ExpandListArgument(value, expanded);
|
||||||
|
|
||||||
this->AddPrefixPaths(expanded, this->FC->Makefile->GetCurrentDirectory());
|
this->AddPrefixPaths(expanded,
|
||||||
|
this->FC->Makefile->GetCurrentSourceDirectory());
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -197,7 +197,7 @@ bool cmSetPropertyCommand::HandleDirectoryMode()
|
|||||||
std::string dir = *this->Names.begin();
|
std::string dir = *this->Names.begin();
|
||||||
if(!cmSystemTools::FileIsFullPath(dir.c_str()))
|
if(!cmSystemTools::FileIsFullPath(dir.c_str()))
|
||||||
{
|
{
|
||||||
dir = this->Makefile->GetCurrentDirectory();
|
dir = this->Makefile->GetCurrentSourceDirectory();
|
||||||
dir += "/";
|
dir += "/";
|
||||||
dir += *this->Names.begin();
|
dir += *this->Names.begin();
|
||||||
}
|
}
|
||||||
|
@ -162,7 +162,7 @@ bool cmSourceFile::FindFullPath(std::string* error)
|
|||||||
const char* tryDirs[3] = {0, 0, 0};
|
const char* tryDirs[3] = {0, 0, 0};
|
||||||
if(this->Location.DirectoryIsAmbiguous())
|
if(this->Location.DirectoryIsAmbiguous())
|
||||||
{
|
{
|
||||||
tryDirs[0] = mf->GetCurrentDirectory();
|
tryDirs[0] = mf->GetCurrentSourceDirectory();
|
||||||
tryDirs[1] = mf->GetCurrentOutputDirectory();
|
tryDirs[1] = mf->GetCurrentOutputDirectory();
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
|
@ -93,7 +93,7 @@ void cmSourceFileLocation::DirectoryUseSource()
|
|||||||
{
|
{
|
||||||
this->Directory =
|
this->Directory =
|
||||||
cmSystemTools::CollapseFullPath(
|
cmSystemTools::CollapseFullPath(
|
||||||
this->Directory, this->Makefile->GetCurrentDirectory());
|
this->Directory, this->Makefile->GetCurrentSourceDirectory());
|
||||||
this->AmbiguousDirectory = false;
|
this->AmbiguousDirectory = false;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -143,7 +143,7 @@ void cmSourceFileLocation::UpdateExtension(const std::string& name)
|
|||||||
// Check the source tree only because a file in the build tree should
|
// Check the source tree only because a file in the build tree should
|
||||||
// be specified by full path at least once. We do not want this
|
// be specified by full path at least once. We do not want this
|
||||||
// detection to depend on whether the project has already been built.
|
// detection to depend on whether the project has already been built.
|
||||||
tryPath = this->Makefile->GetCurrentDirectory();
|
tryPath = this->Makefile->GetCurrentSourceDirectory();
|
||||||
tryPath += "/";
|
tryPath += "/";
|
||||||
}
|
}
|
||||||
if(!this->Directory.empty())
|
if(!this->Directory.empty())
|
||||||
@ -282,7 +282,7 @@ bool cmSourceFileLocation::Matches(cmSourceFileLocation const& loc)
|
|||||||
// Compare possible directory combinations.
|
// Compare possible directory combinations.
|
||||||
std::string const& srcDir =
|
std::string const& srcDir =
|
||||||
cmSystemTools::CollapseFullPath(
|
cmSystemTools::CollapseFullPath(
|
||||||
this->Directory, this->Makefile->GetCurrentDirectory());
|
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->GetCurrentOutputDirectory());
|
||||||
@ -297,7 +297,7 @@ bool cmSourceFileLocation::Matches(cmSourceFileLocation const& loc)
|
|||||||
// Compare possible directory combinations.
|
// Compare possible directory combinations.
|
||||||
std::string const& srcDir =
|
std::string const& srcDir =
|
||||||
cmSystemTools::CollapseFullPath(
|
cmSystemTools::CollapseFullPath(
|
||||||
loc.Directory, loc.Makefile->GetCurrentDirectory());
|
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->GetCurrentOutputDirectory());
|
||||||
|
@ -81,7 +81,7 @@ bool cmSourceGroupCommand
|
|||||||
std::string src = args[i];
|
std::string src = args[i];
|
||||||
if(!cmSystemTools::FileIsFullPath(src.c_str()))
|
if(!cmSystemTools::FileIsFullPath(src.c_str()))
|
||||||
{
|
{
|
||||||
src = this->Makefile->GetCurrentDirectory();
|
src = this->Makefile->GetCurrentSourceDirectory();
|
||||||
src += "/";
|
src += "/";
|
||||||
src += args[i];
|
src += args[i];
|
||||||
}
|
}
|
||||||
|
@ -39,7 +39,7 @@ bool cmSubdirCommand
|
|||||||
|
|
||||||
// if they specified a relative path then compute the full
|
// if they specified a relative path then compute the full
|
||||||
std::string srcPath =
|
std::string srcPath =
|
||||||
std::string(this->Makefile->GetCurrentDirectory()) +
|
std::string(this->Makefile->GetCurrentSourceDirectory()) +
|
||||||
"/" + i->c_str();
|
"/" + i->c_str();
|
||||||
if (cmSystemTools::FileIsDirectory(srcPath))
|
if (cmSystemTools::FileIsDirectory(srcPath))
|
||||||
{
|
{
|
||||||
|
@ -75,7 +75,7 @@ bool cmUtilitySourceCommand
|
|||||||
// The third argument specifies the relative directory of the source
|
// The third argument specifies the relative directory of the source
|
||||||
// of the utility.
|
// of the utility.
|
||||||
std::string relativeSource = *arg++;
|
std::string relativeSource = *arg++;
|
||||||
std::string utilitySource = this->Makefile->GetCurrentDirectory();
|
std::string utilitySource = this->Makefile->GetCurrentSourceDirectory();
|
||||||
utilitySource = utilitySource+"/"+relativeSource;
|
utilitySource = utilitySource+"/"+relativeSource;
|
||||||
|
|
||||||
// If the directory doesn't exist, the source has not been included.
|
// If the directory doesn't exist, the source has not been included.
|
||||||
|
@ -2194,7 +2194,7 @@ void cmVisualStudio10TargetGenerator::WriteAntBuildOptions(
|
|||||||
{
|
{
|
||||||
// Look through the sources for AndroidManifest.xml and use
|
// Look through the sources for AndroidManifest.xml and use
|
||||||
// its location as the root source directory.
|
// its location as the root source directory.
|
||||||
std::string rootDir = this->Makefile->GetCurrentDirectory();
|
std::string rootDir = this->Makefile->GetCurrentSourceDirectory();
|
||||||
{
|
{
|
||||||
std::vector<cmSourceFile const*> extraSources;
|
std::vector<cmSourceFile const*> extraSources;
|
||||||
this->GeneratorTarget->GetExtraSources(extraSources, "");
|
this->GeneratorTarget->GetExtraSources(extraSources, "");
|
||||||
|
@ -154,7 +154,7 @@ static void cmakemainProgressCallback(const char *m, float prog,
|
|||||||
if ((mf) && (strstr(m, "Configuring")==m) && (prog<0))
|
if ((mf) && (strstr(m, "Configuring")==m) && (prog<0))
|
||||||
{
|
{
|
||||||
dir = " ";
|
dir = " ";
|
||||||
dir += mf->GetCurrentDirectory();
|
dir += mf->GetCurrentSourceDirectory();
|
||||||
}
|
}
|
||||||
else if ((mf) && (strstr(m, "Generating")==m))
|
else if ((mf) && (strstr(m, "Generating")==m))
|
||||||
{
|
{
|
||||||
|
Loading…
x
Reference in New Issue
Block a user