Browse Source

Generate target-wide flags before individual build rules

This switches the internal generation order but does not affect the
results.  The new order ensures that any internal state changed by
generating target-wide flags is known when the individual rules that use
those flags are generated.
Brad King 14 years ago
parent
commit
6e8a67f99a

+ 3 - 3
Source/cmMakefileExecutableTargetGenerator.cxx

@@ -47,12 +47,12 @@ void cmMakefileExecutableTargetGenerator::WriteRuleFiles()
   // write rules used to help build object files
   this->WriteCommonCodeRules();
 
-  // write in rules for object files and custom commands
-  this->WriteTargetBuildRules();
-
   // write the per-target per-language flags
   this->WriteTargetLanguageFlags();
 
+  // write in rules for object files and custom commands
+  this->WriteTargetBuildRules();
+
   // write the link rules
   this->WriteExecutableRule(false);
   if(this->Target->NeedRelinkBeforeInstall(this->ConfigName))

+ 3 - 3
Source/cmMakefileLibraryTargetGenerator.cxx

@@ -52,12 +52,12 @@ void cmMakefileLibraryTargetGenerator::WriteRuleFiles()
   // write rules used to help build object files
   this->WriteCommonCodeRules();
 
-  // write in rules for object files and custom commands
-  this->WriteTargetBuildRules();
-
   // write the per-target per-language flags
   this->WriteTargetLanguageFlags();
 
+  // write in rules for object files and custom commands
+  this->WriteTargetBuildRules();
+
   // write the link rules
   // Write the rule for this target type.
   switch(this->Target->GetType())