ENH: add support for re-running cmake if the cmakefiles change
This commit is contained in:
parent
3df8a59374
commit
8c06f8e294
@ -287,6 +287,13 @@ void cmGlobalUnixMakefileGenerator3::WriteMainCMakefile()
|
|||||||
tmpStr += "/CMakeFiles/CMakeDirectoryInformation.cmake";
|
tmpStr += "/CMakeFiles/CMakeDirectoryInformation.cmake";
|
||||||
cmakefileStream << " \"" <<
|
cmakefileStream << " \"" <<
|
||||||
lg->Convert(tmpStr.c_str(),cmLocalGenerator::HOME_OUTPUT).c_str() << "\"\n";
|
lg->Convert(tmpStr.c_str(),cmLocalGenerator::HOME_OUTPUT).c_str() << "\"\n";
|
||||||
|
const std::vector<std::string>& outfiles = lg->GetMakefile()->GetOutputFiles();
|
||||||
|
for(std::vector<std::string>::const_iterator k= outfiles.begin();
|
||||||
|
k != outfiles.end(); ++k)
|
||||||
|
{
|
||||||
|
cmakefileStream << " \"" <<
|
||||||
|
lg->Convert(k->c_str(),cmLocalGenerator::HOME_OUTPUT).c_str() << "\"\n";
|
||||||
|
}
|
||||||
}
|
}
|
||||||
cmakefileStream << " )\n\n";
|
cmakefileStream << " )\n\n";
|
||||||
|
|
||||||
|
@ -2368,6 +2368,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(infile);
|
||||||
|
this->AddCMakeOutputFile(outfile);
|
||||||
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);
|
||||||
|
@ -524,11 +524,18 @@ 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 char* file)
|
||||||
{ this->ListFiles.push_back(file);}
|
{ this->ListFiles.push_back(file);}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Get the vector of files created by this makefile
|
||||||
|
*/
|
||||||
|
const std::vector<std::string>& GetOutputFiles() const
|
||||||
|
{ return this->OutputFiles; }
|
||||||
|
void AddCMakeOutputFile(const char* file)
|
||||||
|
{ this->ListFiles.push_back(file);}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Expand all defined variables in the string.
|
* Expand all defined variables in the string.
|
||||||
* Defined variables come from the this->Definitions map.
|
* Defined variables come from the this->Definitions map.
|
||||||
@ -709,6 +716,7 @@ protected:
|
|||||||
std::vector<std::string> LinkDirectories;
|
std::vector<std::string> LinkDirectories;
|
||||||
|
|
||||||
std::vector<std::string> ListFiles; // list of command files loaded
|
std::vector<std::string> ListFiles; // list of command files loaded
|
||||||
|
std::vector<std::string> OutputFiles; // list of command files loaded
|
||||||
|
|
||||||
|
|
||||||
cmTarget::LinkLibraryVectorType LinkLibraries;
|
cmTarget::LinkLibraryVectorType LinkLibraries;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user