Merge topic 'makefile_AddCMakeOutputFile_signature'
6dbd4a5
cmMakefile: Refactor AddCMakeDependFile and AddCMakeOutputFile.
This commit is contained in:
commit
493489665e
|
@ -396,7 +396,7 @@ int cmCoreTryCompile::TryCompileCode(std::vector<std::string> const& argv)
|
||||||
// Add dependencies on any non-temporary sources.
|
// Add dependencies on any non-temporary sources.
|
||||||
if(si->find("CMakeTmp") == si->npos)
|
if(si->find("CMakeTmp") == si->npos)
|
||||||
{
|
{
|
||||||
this->Makefile->AddCMakeDependFile(si->c_str());
|
this->Makefile->AddCMakeDependFile(*si);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
fprintf(fout, ")\n");
|
fprintf(fout, ")\n");
|
||||||
|
|
|
@ -3369,7 +3369,7 @@ int cmMakefile::ConfigureFile(const char* infile, const char* outfile,
|
||||||
}
|
}
|
||||||
std::string soutfile = outfile;
|
std::string soutfile = outfile;
|
||||||
std::string sinfile = infile;
|
std::string sinfile = infile;
|
||||||
this->AddCMakeDependFile(infile);
|
this->AddCMakeDependFile(sinfile);
|
||||||
cmSystemTools::ConvertToUnixSlashes(soutfile);
|
cmSystemTools::ConvertToUnixSlashes(soutfile);
|
||||||
mode_t perm = 0;
|
mode_t perm = 0;
|
||||||
cmSystemTools::GetPermissions(sinfile.c_str(), perm);
|
cmSystemTools::GetPermissions(sinfile.c_str(), perm);
|
||||||
|
|
|
@ -648,7 +648,7 @@ public:
|
||||||
const std::vector<std::string>& GetListFiles() const
|
const std::vector<std::string>& GetListFiles() const
|
||||||
{ return this->ListFiles; }
|
{ return this->ListFiles; }
|
||||||
///! When the file changes cmake will be re-run from the build system.
|
///! When the file changes cmake will be re-run from the build system.
|
||||||
void AddCMakeDependFile(const char* file)
|
void AddCMakeDependFile(const std::string& file)
|
||||||
{ this->ListFiles.push_back(file);}
|
{ this->ListFiles.push_back(file);}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -666,7 +666,7 @@ public:
|
||||||
*/
|
*/
|
||||||
const std::vector<std::string>& GetOutputFiles() const
|
const std::vector<std::string>& GetOutputFiles() const
|
||||||
{ return this->OutputFiles; }
|
{ return this->OutputFiles; }
|
||||||
void AddCMakeOutputFile(const char* file)
|
void AddCMakeOutputFile(const std::string& file)
|
||||||
{ this->OutputFiles.push_back(file);}
|
{ this->OutputFiles.push_back(file);}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
|
@ -49,7 +49,7 @@ void cmOSXBundleGenerator::CreateAppBundle(const std::string& targetName,
|
||||||
out += "/";
|
out += "/";
|
||||||
out += this->Target->GetAppBundleDirectory(this->ConfigName, false);
|
out += this->Target->GetAppBundleDirectory(this->ConfigName, false);
|
||||||
cmSystemTools::MakeDirectory(out.c_str());
|
cmSystemTools::MakeDirectory(out.c_str());
|
||||||
this->Makefile->AddCMakeOutputFile(out.c_str());
|
this->Makefile->AddCMakeOutputFile(out);
|
||||||
|
|
||||||
std::string newoutpath = out;
|
std::string newoutpath = out;
|
||||||
|
|
||||||
|
@ -62,7 +62,7 @@ void cmOSXBundleGenerator::CreateAppBundle(const std::string& targetName,
|
||||||
this->LocalGenerator->GenerateAppleInfoPList(this->Target,
|
this->LocalGenerator->GenerateAppleInfoPList(this->Target,
|
||||||
targetName.c_str(),
|
targetName.c_str(),
|
||||||
plist.c_str());
|
plist.c_str());
|
||||||
this->Makefile->AddCMakeOutputFile(plist.c_str());
|
this->Makefile->AddCMakeOutputFile(plist);
|
||||||
outpath = newoutpath;
|
outpath = newoutpath;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -114,7 +114,7 @@ void cmOSXBundleGenerator::CreateFramework(
|
||||||
newName += "/Current";
|
newName += "/Current";
|
||||||
cmSystemTools::RemoveFile(newName.c_str());
|
cmSystemTools::RemoveFile(newName.c_str());
|
||||||
cmSystemTools::CreateSymlink(oldName.c_str(), newName.c_str());
|
cmSystemTools::CreateSymlink(oldName.c_str(), newName.c_str());
|
||||||
this->Makefile->AddCMakeOutputFile(newName.c_str());
|
this->Makefile->AddCMakeOutputFile(newName);
|
||||||
|
|
||||||
// foo -> Versions/Current/foo
|
// foo -> Versions/Current/foo
|
||||||
oldName = "Versions/Current/";
|
oldName = "Versions/Current/";
|
||||||
|
@ -123,7 +123,7 @@ void cmOSXBundleGenerator::CreateFramework(
|
||||||
newName += name;
|
newName += name;
|
||||||
cmSystemTools::RemoveFile(newName.c_str());
|
cmSystemTools::RemoveFile(newName.c_str());
|
||||||
cmSystemTools::CreateSymlink(oldName.c_str(), newName.c_str());
|
cmSystemTools::CreateSymlink(oldName.c_str(), newName.c_str());
|
||||||
this->Makefile->AddCMakeOutputFile(newName.c_str());
|
this->Makefile->AddCMakeOutputFile(newName);
|
||||||
|
|
||||||
// Resources -> Versions/Current/Resources
|
// Resources -> Versions/Current/Resources
|
||||||
if(this->MacContentFolders->find("Resources") !=
|
if(this->MacContentFolders->find("Resources") !=
|
||||||
|
@ -134,7 +134,7 @@ void cmOSXBundleGenerator::CreateFramework(
|
||||||
newName += "Resources";
|
newName += "Resources";
|
||||||
cmSystemTools::RemoveFile(newName.c_str());
|
cmSystemTools::RemoveFile(newName.c_str());
|
||||||
cmSystemTools::CreateSymlink(oldName.c_str(), newName.c_str());
|
cmSystemTools::CreateSymlink(oldName.c_str(), newName.c_str());
|
||||||
this->Makefile->AddCMakeOutputFile(newName.c_str());
|
this->Makefile->AddCMakeOutputFile(newName);
|
||||||
}
|
}
|
||||||
|
|
||||||
// Headers -> Versions/Current/Headers
|
// Headers -> Versions/Current/Headers
|
||||||
|
@ -146,7 +146,7 @@ void cmOSXBundleGenerator::CreateFramework(
|
||||||
newName += "Headers";
|
newName += "Headers";
|
||||||
cmSystemTools::RemoveFile(newName.c_str());
|
cmSystemTools::RemoveFile(newName.c_str());
|
||||||
cmSystemTools::CreateSymlink(oldName.c_str(), newName.c_str());
|
cmSystemTools::CreateSymlink(oldName.c_str(), newName.c_str());
|
||||||
this->Makefile->AddCMakeOutputFile(newName.c_str());
|
this->Makefile->AddCMakeOutputFile(newName);
|
||||||
}
|
}
|
||||||
|
|
||||||
// PrivateHeaders -> Versions/Current/PrivateHeaders
|
// PrivateHeaders -> Versions/Current/PrivateHeaders
|
||||||
|
@ -158,7 +158,7 @@ void cmOSXBundleGenerator::CreateFramework(
|
||||||
newName += "PrivateHeaders";
|
newName += "PrivateHeaders";
|
||||||
cmSystemTools::RemoveFile(newName.c_str());
|
cmSystemTools::RemoveFile(newName.c_str());
|
||||||
cmSystemTools::CreateSymlink(oldName.c_str(), newName.c_str());
|
cmSystemTools::CreateSymlink(oldName.c_str(), newName.c_str());
|
||||||
this->Makefile->AddCMakeOutputFile(newName.c_str());
|
this->Makefile->AddCMakeOutputFile(newName);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -174,7 +174,7 @@ void cmOSXBundleGenerator::CreateCFBundle(const std::string& targetName,
|
||||||
out += "/";
|
out += "/";
|
||||||
out += this->Target->GetCFBundleDirectory(this->ConfigName, false);
|
out += this->Target->GetCFBundleDirectory(this->ConfigName, false);
|
||||||
cmSystemTools::MakeDirectory(out.c_str());
|
cmSystemTools::MakeDirectory(out.c_str());
|
||||||
this->Makefile->AddCMakeOutputFile(out.c_str());
|
this->Makefile->AddCMakeOutputFile(out);
|
||||||
|
|
||||||
// Configure the Info.plist file. Note that it needs the executable name
|
// Configure the Info.plist file. Note that it needs the executable name
|
||||||
// to be set.
|
// to be set.
|
||||||
|
@ -184,7 +184,7 @@ void cmOSXBundleGenerator::CreateCFBundle(const std::string& targetName,
|
||||||
this->LocalGenerator->GenerateAppleInfoPList(this->Target,
|
this->LocalGenerator->GenerateAppleInfoPList(this->Target,
|
||||||
targetName.c_str(),
|
targetName.c_str(),
|
||||||
plist.c_str());
|
plist.c_str());
|
||||||
this->Makefile->AddCMakeOutputFile(plist.c_str());
|
this->Makefile->AddCMakeOutputFile(plist);
|
||||||
}
|
}
|
||||||
|
|
||||||
//----------------------------------------------------------------------------
|
//----------------------------------------------------------------------------
|
||||||
|
|
Loading…
Reference in New Issue