[Cmake-commits] CMake branch, next, updated. v2.8.11.2-3129-ge00d810

Stephen Kelly steveire at gmail.com
Mon Jul 15 12:45:16 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  e00d81041514bbc906b2de4ced55daf45987c793 (commit)
       via  9c5ff8a32e7206e26b6ecf13058ba4a8f7bdc5de (commit)
      from  e96cef5a31437a20127da80715bcfd1fdf8911e0 (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=e00d81041514bbc906b2de4ced55daf45987c793
commit e00d81041514bbc906b2de4ced55daf45987c793
Merge: e96cef5 9c5ff8a
Author:     Stephen Kelly <steveire at gmail.com>
AuthorDate: Mon Jul 15 12:45:11 2013 -0400
Commit:     CMake Topic Stage <kwrobot at kitware.com>
CommitDate: Mon Jul 15 12:45:11 2013 -0400

    Merge topic 'fix-mapped-config-genex' into next
    
    9c5ff8a Genex: Fix $<CONFIG> with IMPORTED targets and multiple locations.


http://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=9c5ff8a32e7206e26b6ecf13058ba4a8f7bdc5de
commit 9c5ff8a32e7206e26b6ecf13058ba4a8f7bdc5de
Author:     Stephen Kelly <steveire at gmail.com>
AuthorDate: Mon Jul 15 18:33:49 2013 +0200
Commit:     Stephen Kelly <steveire at gmail.com>
CommitDate: Mon Jul 15 18:40:31 2013 +0200

    Genex: Fix $<CONFIG> with IMPORTED targets and multiple locations.
    
    The old code checked only that there was a LOCATION for the
    specified config, but did not check whether the config actually
    mapped.
    
    Task-number: 14292

diff --git a/Source/cmGeneratorExpressionEvaluator.cxx b/Source/cmGeneratorExpressionEvaluator.cxx
index 2bdff78..22d080c 100644
--- a/Source/cmGeneratorExpressionEvaluator.cxx
+++ b/Source/cmGeneratorExpressionEvaluator.cxx
@@ -564,10 +564,26 @@ static const struct ConfigurationTestNode : public cmGeneratorExpressionNode
       const char* loc = 0;
       const char* imp = 0;
       std::string suffix;
-      return context->CurrentTarget->GetMappedConfig(context->Config,
+      if (context->CurrentTarget->GetMappedConfig(context->Config,
                                                   &loc,
                                                   &imp,
-                                                  suffix) ? "1" : "0";
+                                                  suffix))
+        {
+        // This imported target has an appropriate location
+        // for this (possibly mapped) config.
+        // Check if there is a proper config mapping for the tested config.
+        std::vector<std::string> mappedConfigs;
+        std::string mapProp = "MAP_IMPORTED_CONFIG_";
+        mapProp += context->Config;
+        if(const char* mapValue =
+                        context->CurrentTarget->GetProperty(mapProp.c_str()))
+          {
+          cmSystemTools::ExpandListArgument(cmSystemTools::UpperCase(mapValue),
+                                            mappedConfigs);
+          return std::find(mappedConfigs.begin(), mappedConfigs.end(),
+                          context->Config) != mappedConfigs.end() ? "1" : "0";
+          }
+        }
       }
     return "0";
   }

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

Summary of changes:
 Source/cmGeneratorExpressionEvaluator.cxx |   20 ++++++++++++++++++--
 1 files changed, 18 insertions(+), 2 deletions(-)


hooks/post-receive
-- 
CMake


More information about the Cmake-commits mailing list