[Cmake-commits] CMake branch, next, updated. v2.8.9-1147-g8e3c333

Stephen Kelly steveire at gmail.com
Fri Oct 19 07:47:05 EDT 2012


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  8e3c3332476ae23a873cc2cb7cd7aaa386813179 (commit)
       via  e7f248379cba9db1ff24970fda28dc5885d38344 (commit)
       via  06044c640b4daf96254f4532183b22fc94005e6d (commit)
       via  8fc3c6939d714ee1f23f9067c1d2209bbf8cb622 (commit)
      from  d6108237624254adb4e20c7c45b98f310e6bc626 (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=8e3c3332476ae23a873cc2cb7cd7aaa386813179
commit 8e3c3332476ae23a873cc2cb7cd7aaa386813179
Merge: d610823 e7f2483
Author:     Stephen Kelly <steveire at gmail.com>
AuthorDate: Fri Oct 19 07:46:33 2012 -0400
Commit:     CMake Topic Stage <kwrobot at kitware.com>
CommitDate: Fri Oct 19 07:46:33 2012 -0400

    Merge topic 'genex-validate-target-property-names' into next
    
    e7f2483 GexEx: Validate Target names and property names differently.
    06044c6 GenEx: Add an accessor for imported targets in a makefile.
    8fc3c69 GenEx: Create cmGeneratorTargets for imported targets.


http://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=e7f248379cba9db1ff24970fda28dc5885d38344
commit e7f248379cba9db1ff24970fda28dc5885d38344
Author:     Stephen Kelly <steveire at gmail.com>
AuthorDate: Fri Oct 19 13:11:59 2012 +0200
Commit:     Stephen Kelly <steveire at gmail.com>
CommitDate: Fri Oct 19 13:41:55 2012 +0200

    GexEx: Validate Target names and property names differently.
    
    In the unit test, use the same IMPORTED_LOCATION trick that
    the ExportImport test uses.

diff --git a/Source/cmGeneratorExpressionEvaluator.cxx b/Source/cmGeneratorExpressionEvaluator.cxx
index 287066a..380c255 100644
--- a/Source/cmGeneratorExpressionEvaluator.cxx
+++ b/Source/cmGeneratorExpressionEvaluator.cxx
@@ -277,8 +277,10 @@ static const struct TargetPropertyNode : public cmGeneratorExpressionNode
           "$<TARGET_PROPERTY:...> expression requires one or two parameters");
       return std::string();
       }
-    cmsys::RegularExpression nameValidator;
-    nameValidator.compile("^[A-Za-z0-9_.-]+$");
+    cmsys::RegularExpression targetNameValidator;
+    targetNameValidator.compile("^[A-Za-z0-9_.-:]+$");
+    cmsys::RegularExpression propertyNameValidator;
+    propertyNameValidator.compile("^[A-Za-z0-9_]+$");
 
     cmGeneratorTarget* target = context->Target;
     std::string propertyName = *parameters.begin();
@@ -301,9 +303,9 @@ static const struct TargetPropertyNode : public cmGeneratorExpressionNode
 
       std::string targetName = parameters.front();
       propertyName = parameters[1];
-      if (!nameValidator.find(targetName.c_str()))
+      if (!targetNameValidator.find(targetName.c_str()))
         {
-        if (!nameValidator.find(propertyName.c_str()))
+        if (!propertyNameValidator.find(propertyName.c_str()))
           {
           ::reportError(context, content->GetOriginalExpression(),
                         "Target name and property name not supported.");
@@ -335,7 +337,7 @@ static const struct TargetPropertyNode : public cmGeneratorExpressionNode
       return std::string();
       }
 
-    if (!nameValidator.find(propertyName.c_str()))
+    if (!propertyNameValidator.find(propertyName.c_str()))
       {
       ::reportError(context, content->GetOriginalExpression(),
                     "Property name not supported.");
@@ -480,7 +482,7 @@ struct TargetFilesystemArtifact : public cmGeneratorExpressionNode
     std::string name = *parameters.begin();
 
     cmsys::RegularExpression targetValidator;
-    targetValidator.compile("^[A-Za-z0-9_.-]+$");
+    targetValidator.compile("^[A-Za-z0-9_.-:]+$");
     if (!targetValidator.find(name.c_str()))
       {
       ::reportError(context, content->GetOriginalExpression(),
diff --git a/Tests/IncludeDirectories/TargetIncludeDirectories/CMakeLists.txt b/Tests/IncludeDirectories/TargetIncludeDirectories/CMakeLists.txt
index d71f92e..7cb1b42 100644
--- a/Tests/IncludeDirectories/TargetIncludeDirectories/CMakeLists.txt
+++ b/Tests/IncludeDirectories/TargetIncludeDirectories/CMakeLists.txt
@@ -17,6 +17,7 @@ create_header(bing)
 create_header(bung)
 create_header(arguments)
 create_header(list)
+create_header(target)
 
 set(CMAKE_INCLUDE_CURRENT_DIR ON)
 
@@ -24,6 +25,7 @@ include_directories("${CMAKE_CURRENT_BINARY_DIR}/bar")
 include_directories("$<1:${CMAKE_CURRENT_BINARY_DIR}/bang>")
 
 add_executable(TargetIncludeDirectories main.cpp)
+
 set_property(TARGET TargetIncludeDirectories APPEND PROPERTY INCLUDE_DIRECTORIES "${CMAKE_CURRENT_BINARY_DIR}/bat")
 set_property(TARGET TargetIncludeDirectories APPEND PROPERTY INCLUDE_DIRECTORIES "${CMAKE_CURRENT_BINARY_DIR}/foo")
 set_property(TARGET TargetIncludeDirectories APPEND PROPERTY
@@ -34,3 +36,12 @@ include_directories("$<1:${CMAKE_CURRENT_BINARY_DIR}/bung>")
 include_directories("sing$<1:/ting>")
 
 include_directories("$<1:${CMAKE_CURRENT_BINARY_DIR}/arguments;${CMAKE_CURRENT_BINARY_DIR}/list>")
+
+add_library(somelib::withcolons UNKNOWN IMPORTED)
+set_property(TARGET somelib::withcolons PROPERTY IMPORTED_LOCATION "${CMAKE_CURRENT_BINARY_DIR}/target")
+set_property(TARGET somelib::withcolons PROPERTY INTERFACE_INCLUDE_DIRECTORIES "${CMAKE_CURRENT_BINARY_DIR}/target")
+
+set_property(TARGET TargetIncludeDirectories
+  APPEND PROPERTY INCLUDE_DIRECTORIES
+  "$<TARGET_PROPERTY:somelib::withcolons,INTERFACE_INCLUDE_DIRECTORIES>"
+)
diff --git a/Tests/IncludeDirectories/TargetIncludeDirectories/main.cpp b/Tests/IncludeDirectories/TargetIncludeDirectories/main.cpp
index 030bb1c..90909d3 100644
--- a/Tests/IncludeDirectories/TargetIncludeDirectories/main.cpp
+++ b/Tests/IncludeDirectories/TargetIncludeDirectories/main.cpp
@@ -9,6 +9,7 @@
 #include "ting.h"
 #include "arguments.h"
 #include "list.h"
+#include "target.h"
 
 int main(int, char**)
 {

http://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=06044c640b4daf96254f4532183b22fc94005e6d
commit 06044c640b4daf96254f4532183b22fc94005e6d
Author:     Stephen Kelly <steveire at gmail.com>
AuthorDate: Wed Oct 10 00:06:40 2012 +0200
Commit:     Stephen Kelly <steveire at gmail.com>
CommitDate: Fri Oct 19 13:41:32 2012 +0200

    GenEx: Add an accessor for imported targets in a makefile.

diff --git a/Source/cmMakefile.h b/Source/cmMakefile.h
index 80a50d6..e6cca9b 100644
--- a/Source/cmMakefile.h
+++ b/Source/cmMakefile.h
@@ -519,6 +519,7 @@ public:
    * Get the list of targets, const version
    */
   const cmTargets &GetTargets() const { return this->Targets; }
+  const std::vector<cmTarget*> &GetOwnedImportedTargets() const { return this->ImportedTargetsOwned; }
 
   const cmGeneratorTargetsType &GetGeneratorTargets() const
     {

http://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=8fc3c6939d714ee1f23f9067c1d2209bbf8cb622
commit 8fc3c6939d714ee1f23f9067c1d2209bbf8cb622
Author:     Stephen Kelly <steveire at gmail.com>
AuthorDate: Wed Oct 10 00:07:34 2012 +0200
Commit:     Stephen Kelly <steveire at gmail.com>
CommitDate: Fri Oct 19 13:41:12 2012 +0200

    GenEx: Create cmGeneratorTargets for imported targets.
    
    We're going to need to link to them, and all the linking API is
    moving to cmGeneratorTarget.

diff --git a/Source/cmGlobalGenerator.cxx b/Source/cmGlobalGenerator.cxx
index 23ec08a..62e2081 100644
--- a/Source/cmGlobalGenerator.cxx
+++ b/Source/cmGlobalGenerator.cxx
@@ -1108,6 +1108,16 @@ void cmGlobalGenerator::CreateGeneratorTargets()
       this->ComputeTargetObjects(gt);
       generatorTargets[t] = gt;
       }
+
+    for(std::vector<cmTarget*>::const_iterator
+          i = mf->GetOwnedImportedTargets().begin();
+        i != mf->GetOwnedImportedTargets().end(); ++i)
+      {
+      cmGeneratorTarget* gt = new cmGeneratorTarget(*i);
+      this->GeneratorTargets[*i] = gt;
+      generatorTargets[*i] = gt;
+      }
+
     mf->SetGeneratorTargets(generatorTargets);
     }
 }

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

Summary of changes:
 Source/cmGeneratorExpressionEvaluator.cxx          |   14 ++++++++------
 Source/cmGlobalGenerator.cxx                       |   10 ++++++++++
 Source/cmMakefile.h                                |    1 +
 .../TargetIncludeDirectories/CMakeLists.txt        |   11 +++++++++++
 .../TargetIncludeDirectories/main.cpp              |    1 +
 5 files changed, 31 insertions(+), 6 deletions(-)


hooks/post-receive
-- 
CMake


More information about the Cmake-commits mailing list