Browse Source

BUG: 7763 fix, OPTIMIZATION was not set right. Also fix for BUG 7764, put XCODE_ATTRIBUTES_ last

Bill Hoffman 17 years ago
parent
commit
600470e5ca
1 changed files with 14 additions and 16 deletions
  1. 14 16
      Source/cmGlobalXCodeGenerator.cxx

+ 14 - 16
Source/cmGlobalXCodeGenerator.cxx

@@ -1618,26 +1618,10 @@ void cmGlobalXCodeGenerator::CreateBuildSettings(cmTarget& target,
     debugStr = "NO";
     }    
 
-  // Convert "XCODE_ATTRIBUTE_*" properties directly.
-  {
-  cmPropertyMap const& props = target.GetProperties();
-  for(cmPropertyMap::const_iterator i = props.begin();
-      i != props.end(); ++i)
-    {
-    if(i->first.find("XCODE_ATTRIBUTE_") == 0)
-      {
-      buildSettings->AddAttribute(i->first.substr(16).c_str(),
-                                  this->CreateString(i->second.GetValue()));
-      }
-    }
-  }
-
   buildSettings->AddAttribute("GCC_GENERATE_DEBUGGING_SYMBOLS",
                               this->CreateString(debugStr));
   buildSettings->AddAttribute("GCC_OPTIMIZATION_LEVEL", 
                               this->CreateString(optLevel));
-  buildSettings->AddAttribute("OPTIMIZATION_CFLAGS", 
-                              this->CreateString(oflagc.c_str()));
   buildSettings->AddAttribute("GCC_SYMBOLS_PRIVATE_EXTERN",
                               this->CreateString("NO"));
   buildSettings->AddAttribute("GCC_INLINES_ARE_PRIVATE_EXTERN",
@@ -1730,6 +1714,20 @@ void cmGlobalXCodeGenerator::CreateBuildSettings(cmTarget& target,
     buildSettings->AddAttribute("DYLIB_COMPATIBILITY_VERSION",
                                 this->CreateString(vso.str().c_str()));
     }
+  // put this last so it can override existing settings
+  // Convert "XCODE_ATTRIBUTE_*" properties directly.
+  {
+  cmPropertyMap const& props = target.GetProperties();
+  for(cmPropertyMap::const_iterator i = props.begin();
+      i != props.end(); ++i)
+    {
+    if(i->first.find("XCODE_ATTRIBUTE_") == 0)
+      {
+      buildSettings->AddAttribute(i->first.substr(16).c_str(),
+                                  this->CreateString(i->second.GetValue()));
+      }
+    }
+  }
 }
 
 //----------------------------------------------------------------------------