COMP: some warning fixes and cleanup
This commit is contained in:
parent
185b6f0b02
commit
8575d2369d
|
@ -334,7 +334,6 @@ cmLocalUnixMakefileGenerator3
|
||||||
// files for this target.
|
// files for this target.
|
||||||
std::vector<std::string> objects;
|
std::vector<std::string> objects;
|
||||||
std::vector<std::string> external_objects;
|
std::vector<std::string> external_objects;
|
||||||
std::vector<std::string> provides_requires;
|
|
||||||
const std::vector<cmSourceFile*>& sources = target.GetSourceFiles();
|
const std::vector<cmSourceFile*>& sources = target.GetSourceFiles();
|
||||||
for(std::vector<cmSourceFile*>::const_iterator source = sources.begin();
|
for(std::vector<cmSourceFile*>::const_iterator source = sources.begin();
|
||||||
source != sources.end(); ++source)
|
source != sources.end(); ++source)
|
||||||
|
@ -345,7 +344,7 @@ cmLocalUnixMakefileGenerator3
|
||||||
if(!m_GlobalGenerator->IgnoreFile((*source)->GetSourceExtension().c_str()))
|
if(!m_GlobalGenerator->IgnoreFile((*source)->GetSourceExtension().c_str()))
|
||||||
{
|
{
|
||||||
// Generate this object file's rule file.
|
// Generate this object file's rule file.
|
||||||
this->WriteObjectRuleFiles(target, *(*source), objects,provides_requires);
|
this->WriteObjectRuleFiles(target, *(*source), objects);
|
||||||
}
|
}
|
||||||
else if((*source)->GetPropertyAsBool("EXTERNAL_OBJECT"))
|
else if((*source)->GetPropertyAsBool("EXTERNAL_OBJECT"))
|
||||||
{
|
{
|
||||||
|
@ -402,23 +401,19 @@ cmLocalUnixMakefileGenerator3
|
||||||
{
|
{
|
||||||
case cmTarget::STATIC_LIBRARY:
|
case cmTarget::STATIC_LIBRARY:
|
||||||
this->WriteStaticLibraryRule(ruleFileStream, ruleFileName.c_str(),
|
this->WriteStaticLibraryRule(ruleFileStream, ruleFileName.c_str(),
|
||||||
target, objects, external_objects,
|
target, objects, external_objects);
|
||||||
provides_requires);
|
|
||||||
break;
|
break;
|
||||||
case cmTarget::SHARED_LIBRARY:
|
case cmTarget::SHARED_LIBRARY:
|
||||||
this->WriteSharedLibraryRule(ruleFileStream, ruleFileName.c_str(),
|
this->WriteSharedLibraryRule(ruleFileStream, ruleFileName.c_str(),
|
||||||
target, objects, external_objects,
|
target, objects, external_objects);
|
||||||
provides_requires);
|
|
||||||
break;
|
break;
|
||||||
case cmTarget::MODULE_LIBRARY:
|
case cmTarget::MODULE_LIBRARY:
|
||||||
this->WriteModuleLibraryRule(ruleFileStream, ruleFileName.c_str(),
|
this->WriteModuleLibraryRule(ruleFileStream, ruleFileName.c_str(),
|
||||||
target, objects, external_objects,
|
target, objects, external_objects);
|
||||||
provides_requires);
|
|
||||||
break;
|
break;
|
||||||
case cmTarget::EXECUTABLE:
|
case cmTarget::EXECUTABLE:
|
||||||
this->WriteExecutableRule(ruleFileStream, ruleFileName.c_str(),
|
this->WriteExecutableRule(ruleFileStream, ruleFileName.c_str(),
|
||||||
target, objects, external_objects,
|
target, objects, external_objects);
|
||||||
provides_requires);
|
|
||||||
break;
|
break;
|
||||||
default:
|
default:
|
||||||
break;
|
break;
|
||||||
|
@ -435,7 +430,6 @@ cmLocalUnixMakefileGenerator3
|
||||||
std::vector<std::string>& depends,
|
std::vector<std::string>& depends,
|
||||||
std::string& depMakeFile)
|
std::string& depMakeFile)
|
||||||
{
|
{
|
||||||
// TODO: what the heck is this?
|
|
||||||
// Generate the build-time dependencies file for this object file.
|
// Generate the build-time dependencies file for this object file.
|
||||||
std::string depMarkFile;
|
std::string depMarkFile;
|
||||||
if(!this->GenerateDependsMakeFile(lang, obj.c_str(),
|
if(!this->GenerateDependsMakeFile(lang, obj.c_str(),
|
||||||
|
@ -499,8 +493,7 @@ cmLocalUnixMakefileGenerator3
|
||||||
const cmTarget& target,
|
const cmTarget& target,
|
||||||
const cmSourceFile& source,
|
const cmSourceFile& source,
|
||||||
std::vector<std::string>& depends,
|
std::vector<std::string>& depends,
|
||||||
std::string &depMakeFile,
|
std::string &depMakeFile)
|
||||||
std::vector<std::string>& provides_requires)
|
|
||||||
{
|
{
|
||||||
// Open the rule file for writing. This should be copy-if-different
|
// Open the rule file for writing. This should be copy-if-different
|
||||||
// because the rules may depend on this file itself.
|
// because the rules may depend on this file itself.
|
||||||
|
@ -651,8 +644,6 @@ cmLocalUnixMakefileGenerator3
|
||||||
this->WriteMakeRule(ruleFileStream, 0,
|
this->WriteMakeRule(ruleFileStream, 0,
|
||||||
objectProvides.c_str(), p_depends, no_commands);
|
objectProvides.c_str(), p_depends, no_commands);
|
||||||
|
|
||||||
// Add this to the set of provides-requires objects on the target.
|
|
||||||
provides_requires.push_back(objectRequires);
|
|
||||||
{
|
{
|
||||||
// Add the requires.build target to recursively build the provides
|
// Add the requires.build target to recursively build the provides
|
||||||
// target after needed information is up to date.
|
// target after needed information is up to date.
|
||||||
|
@ -671,8 +662,7 @@ cmLocalUnixMakefileGenerator3
|
||||||
void
|
void
|
||||||
cmLocalUnixMakefileGenerator3
|
cmLocalUnixMakefileGenerator3
|
||||||
::WriteObjectRuleFiles(const cmTarget& target, const cmSourceFile& source,
|
::WriteObjectRuleFiles(const cmTarget& target, const cmSourceFile& source,
|
||||||
std::vector<std::string>& objects,
|
std::vector<std::string>& objects)
|
||||||
std::vector<std::string>& provides_requires)
|
|
||||||
{
|
{
|
||||||
// Identify the language of the source file.
|
// Identify the language of the source file.
|
||||||
const char* lang = this->GetSourceFileLanguage(source);
|
const char* lang = this->GetSourceFileLanguage(source);
|
||||||
|
@ -720,8 +710,7 @@ cmLocalUnixMakefileGenerator3
|
||||||
std::string depMakeFile;
|
std::string depMakeFile;
|
||||||
|
|
||||||
// generate the build rule file
|
// generate the build rule file
|
||||||
this->WriteObjectBuildFile(obj, lang, target, source, depends, depMakeFile,
|
this->WriteObjectBuildFile(obj, lang, target, source, depends, depMakeFile);
|
||||||
provides_requires);
|
|
||||||
|
|
||||||
// The object file should be checked for dependency integrity.
|
// The object file should be checked for dependency integrity.
|
||||||
m_CheckDependFiles[lang].insert(relativeObj);
|
m_CheckDependFiles[lang].insert(relativeObj);
|
||||||
|
@ -881,9 +870,9 @@ cmLocalUnixMakefileGenerator3
|
||||||
depMakeFile = checker->GetMakeFileName();
|
depMakeFile = checker->GetMakeFileName();
|
||||||
depMarkFile = checker->GetMarkFileName();
|
depMarkFile = checker->GetMarkFileName();
|
||||||
|
|
||||||
|
// Check the dependencies. Ths is required because we need at least an
|
||||||
// Todo is this required???
|
// empty foo.obj.depends.make for make to include, so at cmake time the
|
||||||
// Check the dependencies.
|
// ::Check() method will generate that if it does not exist
|
||||||
checker->Check();
|
checker->Check();
|
||||||
|
|
||||||
return true;
|
return true;
|
||||||
|
@ -1466,8 +1455,7 @@ cmLocalUnixMakefileGenerator3
|
||||||
const char* ruleFileName,
|
const char* ruleFileName,
|
||||||
const cmTarget& target,
|
const cmTarget& target,
|
||||||
const std::vector<std::string>& objects,
|
const std::vector<std::string>& objects,
|
||||||
const std::vector<std::string>& external_objects,
|
const std::vector<std::string>& external_objects)
|
||||||
const std::vector<std::string>& provides_requires)
|
|
||||||
{
|
{
|
||||||
// Write the dependency generation rule.
|
// Write the dependency generation rule.
|
||||||
this->WriteTargetDependRule(ruleFileStream, target, objects);
|
this->WriteTargetDependRule(ruleFileStream, target, objects);
|
||||||
|
@ -1647,8 +1635,7 @@ cmLocalUnixMakefileGenerator3
|
||||||
const char* ruleFileName,
|
const char* ruleFileName,
|
||||||
const cmTarget& target,
|
const cmTarget& target,
|
||||||
const std::vector<std::string>& objects,
|
const std::vector<std::string>& objects,
|
||||||
const std::vector<std::string>& external_objects,
|
const std::vector<std::string>& external_objects)
|
||||||
const std::vector<std::string>& provides_requires)
|
|
||||||
{
|
{
|
||||||
const char* linkLanguage =
|
const char* linkLanguage =
|
||||||
target.GetLinkerLanguage(this->GetGlobalGenerator());
|
target.GetLinkerLanguage(this->GetGlobalGenerator());
|
||||||
|
@ -1660,8 +1647,7 @@ cmLocalUnixMakefileGenerator3
|
||||||
this->AppendFlags(extraFlags, target.GetProperty("STATIC_LIBRARY_FLAGS"));
|
this->AppendFlags(extraFlags, target.GetProperty("STATIC_LIBRARY_FLAGS"));
|
||||||
this->WriteLibraryRule(ruleFileStream, ruleFileName, target,
|
this->WriteLibraryRule(ruleFileStream, ruleFileName, target,
|
||||||
objects, external_objects,
|
objects, external_objects,
|
||||||
linkRuleVar.c_str(), extraFlags.c_str(),
|
linkRuleVar.c_str(), extraFlags.c_str());
|
||||||
provides_requires);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
//----------------------------------------------------------------------------
|
//----------------------------------------------------------------------------
|
||||||
|
@ -1671,8 +1657,7 @@ cmLocalUnixMakefileGenerator3
|
||||||
const char* ruleFileName,
|
const char* ruleFileName,
|
||||||
const cmTarget& target,
|
const cmTarget& target,
|
||||||
const std::vector<std::string>& objects,
|
const std::vector<std::string>& objects,
|
||||||
const std::vector<std::string>& external_objects,
|
const std::vector<std::string>& external_objects)
|
||||||
const std::vector<std::string>& provides_requires)
|
|
||||||
{
|
{
|
||||||
const char* linkLanguage =
|
const char* linkLanguage =
|
||||||
target.GetLinkerLanguage(this->GetGlobalGenerator());
|
target.GetLinkerLanguage(this->GetGlobalGenerator());
|
||||||
|
@ -1700,8 +1685,7 @@ cmLocalUnixMakefileGenerator3
|
||||||
}
|
}
|
||||||
this->WriteLibraryRule(ruleFileStream, ruleFileName, target,
|
this->WriteLibraryRule(ruleFileStream, ruleFileName, target,
|
||||||
objects, external_objects,
|
objects, external_objects,
|
||||||
linkRuleVar.c_str(), extraFlags.c_str(),
|
linkRuleVar.c_str(), extraFlags.c_str());
|
||||||
provides_requires);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
//----------------------------------------------------------------------------
|
//----------------------------------------------------------------------------
|
||||||
|
@ -1711,8 +1695,7 @@ cmLocalUnixMakefileGenerator3
|
||||||
const char* ruleFileName,
|
const char* ruleFileName,
|
||||||
const cmTarget& target,
|
const cmTarget& target,
|
||||||
const std::vector<std::string>& objects,
|
const std::vector<std::string>& objects,
|
||||||
const std::vector<std::string>& external_objects,
|
const std::vector<std::string>& external_objects)
|
||||||
const std::vector<std::string>& provides_requires)
|
|
||||||
{
|
{
|
||||||
const char* linkLanguage =
|
const char* linkLanguage =
|
||||||
target.GetLinkerLanguage(this->GetGlobalGenerator());
|
target.GetLinkerLanguage(this->GetGlobalGenerator());
|
||||||
|
@ -1726,8 +1709,7 @@ cmLocalUnixMakefileGenerator3
|
||||||
// TODO: .def files should be supported here also.
|
// TODO: .def files should be supported here also.
|
||||||
this->WriteLibraryRule(ruleFileStream, ruleFileName, target,
|
this->WriteLibraryRule(ruleFileStream, ruleFileName, target,
|
||||||
objects, external_objects,
|
objects, external_objects,
|
||||||
linkRuleVar.c_str(), extraFlags.c_str(),
|
linkRuleVar.c_str(), extraFlags.c_str());
|
||||||
provides_requires);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
//----------------------------------------------------------------------------
|
//----------------------------------------------------------------------------
|
||||||
|
@ -1739,8 +1721,7 @@ cmLocalUnixMakefileGenerator3
|
||||||
const std::vector<std::string>& objects,
|
const std::vector<std::string>& objects,
|
||||||
const std::vector<std::string>& external_objects,
|
const std::vector<std::string>& external_objects,
|
||||||
const char* linkRuleVar,
|
const char* linkRuleVar,
|
||||||
const char* extraFlags,
|
const char* extraFlags)
|
||||||
const std::vector<std::string>& provides_requires)
|
|
||||||
{
|
{
|
||||||
// Write the dependency generation rule.
|
// Write the dependency generation rule.
|
||||||
this->WriteTargetDependRule(ruleFileStream, target, objects);
|
this->WriteTargetDependRule(ruleFileStream, target, objects);
|
||||||
|
|
|
@ -181,8 +181,7 @@ protected:
|
||||||
// create the rule files for an object
|
// create the rule files for an object
|
||||||
void WriteObjectRuleFiles(const cmTarget& target,
|
void WriteObjectRuleFiles(const cmTarget& target,
|
||||||
const cmSourceFile& source,
|
const cmSourceFile& source,
|
||||||
std::vector<std::string>& objects,
|
std::vector<std::string>& objects);
|
||||||
std::vector<std::string>& provides_requires);
|
|
||||||
|
|
||||||
// write the build rule for an object
|
// write the build rule for an object
|
||||||
void WriteObjectBuildFile(std::string &obj,
|
void WriteObjectBuildFile(std::string &obj,
|
||||||
|
@ -190,8 +189,7 @@ protected:
|
||||||
const cmTarget& target,
|
const cmTarget& target,
|
||||||
const cmSourceFile& source,
|
const cmSourceFile& source,
|
||||||
std::vector<std::string>& depends,
|
std::vector<std::string>& depends,
|
||||||
std::string &depMakeFile,
|
std::string &depMakeFile);
|
||||||
std::vector<std::string>& provides_requires);
|
|
||||||
|
|
||||||
// write the depend.make file for an object
|
// write the depend.make file for an object
|
||||||
void WriteObjectDependRules(std::ostream& ruleFileStream,
|
void WriteObjectDependRules(std::ostream& ruleFileStream,
|
||||||
|
@ -221,28 +219,24 @@ protected:
|
||||||
const char* ruleFileName,
|
const char* ruleFileName,
|
||||||
const cmTarget& target,
|
const cmTarget& target,
|
||||||
const std::vector<std::string>& objects,
|
const std::vector<std::string>& objects,
|
||||||
const std::vector<std::string>& external_objects,
|
const std::vector<std::string>& external_objects);
|
||||||
const std::vector<std::string>& provides_requires);
|
|
||||||
void WriteSharedLibraryRule(std::ostream& ruleFileStream,
|
void WriteSharedLibraryRule(std::ostream& ruleFileStream,
|
||||||
const char* ruleFileName,
|
const char* ruleFileName,
|
||||||
const cmTarget& target,
|
const cmTarget& target,
|
||||||
const std::vector<std::string>& objects,
|
const std::vector<std::string>& objects,
|
||||||
const std::vector<std::string>& external_objects,
|
const std::vector<std::string>& external_objects);
|
||||||
const std::vector<std::string>& provides_requires);
|
|
||||||
void WriteModuleLibraryRule(std::ostream& ruleFileStream,
|
void WriteModuleLibraryRule(std::ostream& ruleFileStream,
|
||||||
const char* ruleFileName,
|
const char* ruleFileName,
|
||||||
const cmTarget& target,
|
const cmTarget& target,
|
||||||
const std::vector<std::string>& objects,
|
const std::vector<std::string>& objects,
|
||||||
const std::vector<std::string>& external_objects,
|
const std::vector<std::string>& external_objects);
|
||||||
const std::vector<std::string>& provides_requires);
|
|
||||||
|
|
||||||
// the main code for writing the Executable target rules
|
// the main code for writing the Executable target rules
|
||||||
void WriteExecutableRule(std::ostream& ruleFileStream,
|
void WriteExecutableRule(std::ostream& ruleFileStream,
|
||||||
const char* ruleFileName,
|
const char* ruleFileName,
|
||||||
const cmTarget& target,
|
const cmTarget& target,
|
||||||
const std::vector<std::string>& objects,
|
const std::vector<std::string>& objects,
|
||||||
const std::vector<std::string>& external_objects,
|
const std::vector<std::string>& external_objects);
|
||||||
const std::vector<std::string>& provides_requires);
|
|
||||||
|
|
||||||
// the main method for writing library rules
|
// the main method for writing library rules
|
||||||
void WriteLibraryRule(std::ostream& ruleFileStream,
|
void WriteLibraryRule(std::ostream& ruleFileStream,
|
||||||
|
@ -251,8 +245,7 @@ protected:
|
||||||
const std::vector<std::string>& objects,
|
const std::vector<std::string>& objects,
|
||||||
const std::vector<std::string>& external_objects,
|
const std::vector<std::string>& external_objects,
|
||||||
const char* linkRuleVar,
|
const char* linkRuleVar,
|
||||||
const char* extraLinkFlags,
|
const char* extraLinkFlags);
|
||||||
const std::vector<std::string>& provides_requires);
|
|
||||||
|
|
||||||
void WriteLocalMakefile();
|
void WriteLocalMakefile();
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue