ENH: Added options CMAKE_SKIP_PREPROCESSED_SOURCE_RULES and CMAKE_SKIP_ASSEMBLY_SOURCE_RULES to allow projects to disable generation of .E and .S rules.
This commit is contained in:
parent
3d6100d7c6
commit
8c94be3f18
@ -49,6 +49,8 @@ cmLocalUnixMakefileGenerator3::cmLocalUnixMakefileGenerator3()
|
|||||||
this->UnixCD = true;
|
this->UnixCD = true;
|
||||||
this->ForceVerboseMakefiles=false;
|
this->ForceVerboseMakefiles=false;
|
||||||
this->ColorMakefile = false;
|
this->ColorMakefile = false;
|
||||||
|
this->SkipPreprocessedSourceRules = false;
|
||||||
|
this->SkipAssemblySourceRules = false;
|
||||||
}
|
}
|
||||||
|
|
||||||
//----------------------------------------------------------------------------
|
//----------------------------------------------------------------------------
|
||||||
@ -76,9 +78,13 @@ void cmLocalUnixMakefileGenerator3::Generate()
|
|||||||
// Setup our configuration variables for this directory.
|
// Setup our configuration variables for this directory.
|
||||||
this->ConfigureOutputPaths();
|
this->ConfigureOutputPaths();
|
||||||
|
|
||||||
// Record whether color makefiles are enabled to avoid checking many
|
// Record whether some options are enabled to avoid checking many
|
||||||
// times later.
|
// times later.
|
||||||
this->ColorMakefile = this->Makefile->IsOn("CMAKE_COLOR_MAKEFILE");
|
this->ColorMakefile = this->Makefile->IsOn("CMAKE_COLOR_MAKEFILE");
|
||||||
|
this->SkipPreprocessedSourceRules =
|
||||||
|
this->Makefile->IsOn("CMAKE_SKIP_PREPROCESSED_SOURCE_RULES");
|
||||||
|
this->SkipAssemblySourceRules =
|
||||||
|
this->Makefile->IsOn("CMAKE_SKIP_ASSEMBLY_SOURCE_RULES");
|
||||||
|
|
||||||
// Generate the rule files for each target.
|
// Generate the rule files for each target.
|
||||||
cmTargets& targets = this->Makefile->GetTargets();
|
cmTargets& targets = this->Makefile->GetTargets();
|
||||||
|
@ -212,8 +212,14 @@ public:
|
|||||||
/** Get whether to create rules to generate preprocessed and
|
/** Get whether to create rules to generate preprocessed and
|
||||||
assembly sources. This could be converted to a variable lookup
|
assembly sources. This could be converted to a variable lookup
|
||||||
later. */
|
later. */
|
||||||
bool GetCreatePreprocessedSourceRules() { return true; }
|
bool GetCreatePreprocessedSourceRules()
|
||||||
bool GetCreateAssemblySourceRules() { return true; }
|
{
|
||||||
|
return !this->SkipPreprocessedSourceRules;
|
||||||
|
}
|
||||||
|
bool GetCreateAssemblySourceRules()
|
||||||
|
{
|
||||||
|
return !this->SkipAssemblySourceRules;
|
||||||
|
}
|
||||||
|
|
||||||
protected:
|
protected:
|
||||||
// these two methods just compute reasonable values for LibraryOutputPath
|
// these two methods just compute reasonable values for LibraryOutputPath
|
||||||
@ -324,6 +330,12 @@ private:
|
|||||||
beginning of generation to avoid many duplicate lookups. */
|
beginning of generation to avoid many duplicate lookups. */
|
||||||
bool ColorMakefile;
|
bool ColorMakefile;
|
||||||
|
|
||||||
|
/* Copy the setting of CMAKE_SKIP_PREPROCESSED_SOURCE_RULES and
|
||||||
|
CMAKE_SKIP_ASSEMBLY_SOURCE_RULES at the beginning of generation to
|
||||||
|
avoid many duplicate lookups. */
|
||||||
|
bool SkipPreprocessedSourceRules;
|
||||||
|
bool SkipAssemblySourceRules;
|
||||||
|
|
||||||
std::map<cmStdString,std::vector<cmTarget *> > LocalObjectFiles;
|
std::map<cmStdString,std::vector<cmTarget *> > LocalObjectFiles;
|
||||||
|
|
||||||
/* does the work for each target */
|
/* does the work for each target */
|
||||||
|
Loading…
x
Reference in New Issue
Block a user