[cmake-commits] king committed cmGlobalXCodeGenerator.cxx 1.164 1.165 cmTarget.cxx 1.162 1.163

cmake-commits at cmake.org cmake-commits at cmake.org
Mon Sep 10 10:22:21 EDT 2007


Update of /cvsroot/CMake/CMake/Source
In directory public:/mounts/ram/cvs-serv3634

Modified Files:
	cmGlobalXCodeGenerator.cxx cmTarget.cxx 
Log Message:
ENH: Added XCODE_ATTRIBUTE_<an-attribute> property to allow direct setting of Xcode target attributes in generated projects.  For example, one may set the prefix header property and the corresponding precompiled option to do precompiled headers.


Index: cmGlobalXCodeGenerator.cxx
===================================================================
RCS file: /cvsroot/CMake/CMake/Source/cmGlobalXCodeGenerator.cxx,v
retrieving revision 1.164
retrieving revision 1.165
diff -u -d -r1.164 -r1.165
--- cmGlobalXCodeGenerator.cxx	20 Aug 2007 15:03:16 -0000	1.164
+++ cmGlobalXCodeGenerator.cxx	10 Sep 2007 14:22:19 -0000	1.165
@@ -1576,6 +1576,21 @@
     {
     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", 

Index: cmTarget.cxx
===================================================================
RCS file: /cvsroot/CMake/CMake/Source/cmTarget.cxx,v
retrieving revision 1.162
retrieving revision 1.163
diff -u -d -r1.162 -r1.163
--- cmTarget.cxx	9 Aug 2007 12:49:49 -0000	1.162
+++ cmTarget.cxx	10 Sep 2007 14:22:19 -0000	1.163
@@ -277,6 +277,12 @@
      "All Windows-based systems including Cygwin are DLL platforms.");
 
   cm->DefineProperty
+    ("XCODE_ATTRIBUTE_<an-attribute>", cmProperty::TARGET,
+     "Set Xcode target attributes directly.",
+     "Tell the Xcode generator to set '<an-attribute>' to a given value "
+     "in the generated Xcode project.  Ignored on other generators.");
+
+  cm->DefineProperty
     ("GENERATOR_FILE_NAME", cmProperty::TARGET,
      "Generator's file for this target.",
      "An internal property used by some generators to record the name of "



More information about the Cmake-commits mailing list