[Cmake-commits] CMake branch, next, updated. v2.8.11-2160-g12dae4a

Brad King brad.king at kitware.com
Wed May 22 15:50:45 EDT 2013


This is an automated email from the git hooks/post-receive script. It was
generated because a ref change was pushed to the repository containing
the project "CMake".

The branch, next has been updated
       via  12dae4afb79cb0e0d7ee1f82d7aeb664fd5ed4e2 (commit)
       via  332350b9c4e6cd198315167664104e645ad3d7ff (commit)
      from  b1e8954567af448e7cf92a7edd4ce8050faf85d2 (commit)

Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.

- Log -----------------------------------------------------------------
http://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=12dae4afb79cb0e0d7ee1f82d7aeb664fd5ed4e2
commit 12dae4afb79cb0e0d7ee1f82d7aeb664fd5ed4e2
Merge: b1e8954 332350b
Author:     Brad King <brad.king at kitware.com>
AuthorDate: Wed May 22 15:50:43 2013 -0400
Commit:     CMake Topic Stage <kwrobot at kitware.com>
CommitDate: Wed May 22 15:50:43 2013 -0400

    Merge topic 'xcode-attributes-variant' into next
    
    332350b Xcode: Support XCODE_ATTRIBUTE_ with [variant=<config>] (#12532)


http://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=332350b9c4e6cd198315167664104e645ad3d7ff
commit 332350b9c4e6cd198315167664104e645ad3d7ff
Author:     Cédric OCHS <kervala at gmail.com>
AuthorDate: Wed Dec 12 10:42:00 2012 -0500
Commit:     Brad King <brad.king at kitware.com>
CommitDate: Wed May 22 15:20:10 2013 -0400

    Xcode: Support XCODE_ATTRIBUTE_ with [variant=<config>] (#12532)
    
    Since commit c519bb2b (XCode: Also qoute [] as needed to set
    build-configurations, 2011-04-05) we escape "[]" conditions for
    XCODE_ATTRIBUTE_ settings.  However, we need to handle the "variant"
    condition with a special case to map it only into the settings for the
    matching configuration.

diff --git a/Source/cmGlobalXCodeGenerator.cxx b/Source/cmGlobalXCodeGenerator.cxx
index 870bfa1..7973822 100644
--- a/Source/cmGlobalXCodeGenerator.cxx
+++ b/Source/cmGlobalXCodeGenerator.cxx
@@ -2241,8 +2241,39 @@ void cmGlobalXCodeGenerator::CreateBuildSettings(cmTarget& target,
     {
     if(i->first.find("XCODE_ATTRIBUTE_") == 0)
       {
-      buildSettings->AddAttribute(i->first.substr(16).c_str(),
-                                  this->CreateString(i->second.GetValue()));
+      cmStdString attribute = i->first.substr(16);
+      // Handle [variant=<config>] condition explicitly here.
+      cmStdString::size_type beginVariant =
+        attribute.find("[variant=");
+      if (beginVariant != cmStdString::npos)
+        {
+        cmStdString::size_type endVariant =
+          attribute.find("]", beginVariant+9);
+        if (endVariant != cmStdString::npos)
+          {
+          // Compare the variant to the configuration.
+          cmStdString variant =
+            attribute.substr(beginVariant+9, endVariant-beginVariant-9);
+          if (variant == configName)
+            {
+            // The variant matches the configuration so use this
+            // attribute but drop the [variant=<config>] condition.
+            attribute.erase(beginVariant, endVariant-beginVariant+1);
+            }
+          else
+            {
+            // The variant does not match the configuration so
+            // do not use this attribute.
+            attribute.clear();
+            }
+          }
+        }
+
+      if (!attribute.empty())
+        {
+        buildSettings->AddAttribute(attribute.c_str(),
+                                    this->CreateString(i->second.GetValue()));
+        }
       }
     }
   }

-----------------------------------------------------------------------

Summary of changes:
 Source/cmGlobalXCodeGenerator.cxx |   35 +++++++++++++++++++++++++++++++++--
 1 files changed, 33 insertions(+), 2 deletions(-)


hooks/post-receive
-- 
CMake


More information about the Cmake-commits mailing list