[Cmake-commits] CMake branch, next, updated. v2.8.10.2-1799-g12ad6a9

Stephen Kelly steveire at gmail.com
Tue Jan 29 10:28:54 EST 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  12ad6a9bea7a6948724bdb593c0f14619f593a7b (commit)
       via  76d7722b9f3a9251f5f0be46f5a93362bfc8358b (commit)
      from  a1cc4bbf07b767ab5be5e2e441644c5cb81d01dc (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=12ad6a9bea7a6948724bdb593c0f14619f593a7b
commit 12ad6a9bea7a6948724bdb593c0f14619f593a7b
Merge: a1cc4bb 76d7722
Author:     Stephen Kelly <steveire at gmail.com>
AuthorDate: Tue Jan 29 10:28:52 2013 -0500
Commit:     CMake Topic Stage <kwrobot at kitware.com>
CommitDate: Tue Jan 29 10:28:52 2013 -0500

    Merge topic 'interface-commands-lazy-target-check' into next
    
    76d7722 Revert "Check lazily for whether parameters are targets"

diff --cc Tests/ExportImport/Export/CMakeLists.txt
index efbccea,3f7206b..47521d8
--- a/Tests/ExportImport/Export/CMakeLists.txt
+++ b/Tests/ExportImport/Export/CMakeLists.txt
@@@ -165,11 -150,9 +165,9 @@@ set_property(TARGET testLibRequired APP
      $<BUILD_INTERFACE:$<TARGET_PROPERTY:testLibIncludeRequired5,INTERFACE_INCLUDE_DIRECTORIES>>
      $<INSTALL_INTERFACE:$<TARGET_PROPERTY:testLibIncludeRequired6,INTERFACE_INCLUDE_DIRECTORIES>>
      # Test that the below is non-fatal
 -    $<$<TARGET_DEFINED:no_a_target>:$<TARGET_PROPERTY:no_a_target,INTERFACE_INCLUDE_DIRECTORIES>>
 +    $<$<TARGET_DEFINED:not_a_target>:$<TARGET_PROPERTY:not_a_target,INTERFACE_INCLUDE_DIRECTORIES>>
  )
  
- target_compile_definitions(testLibRequired PUBLIC testSharedLibRequired)
- 
  set_property(TARGET testLibRequired APPEND PROPERTY
    INTERFACE_COMPILE_DEFINITIONS
      testLibRequired_IFACE_DEFINE

http://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=76d7722b9f3a9251f5f0be46f5a93362bfc8358b
commit 76d7722b9f3a9251f5f0be46f5a93362bfc8358b
Author:     Stephen Kelly <steveire at gmail.com>
AuthorDate: Tue Jan 29 16:27:54 2013 +0100
Commit:     Stephen Kelly <steveire at gmail.com>
CommitDate: Tue Jan 29 16:27:54 2013 +0100

    Revert "Check lazily for whether parameters are targets"
    
    This reverts commit 6fcdd6e4d47d0469baad228a84ebb9269dceb488.

diff --git a/Source/cmTargetCompileDefinitionsCommand.cxx b/Source/cmTargetCompileDefinitionsCommand.cxx
index 312d625..683eff6 100644
--- a/Source/cmTargetCompileDefinitionsCommand.cxx
+++ b/Source/cmTargetCompileDefinitionsCommand.cxx
@@ -37,6 +37,16 @@ void cmTargetCompileDefinitionsCommand
   this->Makefile->IssueMessage(cmake::FATAL_ERROR, e.str());
 }
 
+bool cmTargetCompileDefinitionsCommand
+::HandleNonTargetArg(std::string &content,
+                   const std::string &sep,
+                   const std::string &entry,
+                   const std::string &)
+{
+  content += sep + entry;
+  return true;
+}
+
 void cmTargetCompileDefinitionsCommand
 ::HandleDirectContent(cmTarget *tgt, const std::string &content,
                                    bool)
diff --git a/Source/cmTargetCompileDefinitionsCommand.h b/Source/cmTargetCompileDefinitionsCommand.h
index 6e8fc84..d49b9e8 100644
--- a/Source/cmTargetCompileDefinitionsCommand.h
+++ b/Source/cmTargetCompileDefinitionsCommand.h
@@ -81,6 +81,11 @@ private:
   virtual void HandleImportedTarget(const std::string &tgt);
   virtual void HandleMissingTarget(const std::string &name);
 
+  virtual bool HandleNonTargetArg(std::string &content,
+                          const std::string &sep,
+                          const std::string &entry,
+                          const std::string &tgt);
+
   virtual void HandleDirectContent(cmTarget *tgt, const std::string &content,
                                    bool prepend);
 };
diff --git a/Source/cmTargetIncludeDirectoriesCommand.cxx b/Source/cmTargetIncludeDirectoriesCommand.cxx
index af0179f..aeba468 100644
--- a/Source/cmTargetIncludeDirectoriesCommand.cxx
+++ b/Source/cmTargetIncludeDirectoriesCommand.cxx
@@ -41,20 +41,23 @@ void cmTargetIncludeDirectoriesCommand
 }
 
 //----------------------------------------------------------------------------
-void cmTargetIncludeDirectoriesCommand
-::HandleMaybeTargetArg(std::string &content,
-                       const std::string &sep,
-                       const std::string &entry,
-                       const std::string &fragment)
+bool cmTargetIncludeDirectoriesCommand
+::HandleNonTargetArg(std::string &content,
+                   const std::string &sep,
+                   const std::string &entry,
+                   const std::string &tgt)
 {
   if (!cmSystemTools::FileIsFullPath(entry.c_str()))
     {
-    content += sep + fragment;
-    }
-  else
-    {
-    content += sep + entry;
+    cmOStringStream e;
+    e << "Cannot specify relative include directory \"" << entry << "\" for "
+         "target \"" << tgt << "\". Only absolute paths are permitted";
+    this->Makefile->IssueMessage(cmake::FATAL_ERROR, e.str());
+    return false;
     }
+
+  content += sep + entry;
+  return true;
 }
 
 //----------------------------------------------------------------------------
diff --git a/Source/cmTargetIncludeDirectoriesCommand.h b/Source/cmTargetIncludeDirectoriesCommand.h
index a20549f..5a5f859 100644
--- a/Source/cmTargetIncludeDirectoriesCommand.h
+++ b/Source/cmTargetIncludeDirectoriesCommand.h
@@ -85,10 +85,10 @@ private:
   virtual void HandleImportedTarget(const std::string &tgt);
   virtual void HandleMissingTarget(const std::string &name);
 
-  virtual void HandleMaybeTargetArg(std::string &content,
-                                    const std::string &sep,
-                                    const std::string &entry,
-                                    const std::string &fragment);
+  virtual bool HandleNonTargetArg(std::string &content,
+                          const std::string &sep,
+                          const std::string &entry,
+                          const std::string &tgt);
 
   virtual void HandleDirectContent(cmTarget *tgt, const std::string &content,
                                    bool prepend);
diff --git a/Source/cmTargetPropCommandBase.cxx b/Source/cmTargetPropCommandBase.cxx
index 0ed04f3..e1eb1d2 100644
--- a/Source/cmTargetPropCommandBase.cxx
+++ b/Source/cmTargetPropCommandBase.cxx
@@ -108,31 +108,18 @@ bool cmTargetPropCommandBase
       this->PopulateTargetProperies(scope, content, prepend);
       return true;
       }
-    if(isGeneratorExpression(args[i]))
+    if (this->Makefile->FindTargetToUse(args[i].c_str()))
+      {
+      content += sep + "$<TARGET_PROPERTY:" + args[i]
+                      + ",INTERFACE_" + this->Property + ">";
+      }
+    else if(isGeneratorExpression(args[i]))
       {
       content += sep + args[i];
       }
-    else
+    else if (!this->HandleNonTargetArg(content, sep, args[i], args[0]))
       {
-      cmsys::RegularExpression targetNameValidator;
-      targetNameValidator.compile("^[A-Za-z0-9_.:-]+$");
-      if (!targetNameValidator.find(args[i].c_str()))
-        {
-        content += sep + args[i];
-        }
-      else
-        {
-        const std::string fragment = "$<TARGET_PROPERTY:" + args[i]
-                                   + ",INTERFACE_" + this->Property + ">";
-        if (this->Makefile->FindTargetToUse(args[i].c_str()))
-          {
-          content += sep + fragment;
-          }
-        else
-          {
-          this->HandleMaybeTargetArg(content, sep, args[i], fragment);
-          }
-        }
+      return false;
       }
     sep = ";";
     }
@@ -142,19 +129,6 @@ bool cmTargetPropCommandBase
 
 //----------------------------------------------------------------------------
 void cmTargetPropCommandBase
-::HandleMaybeTargetArg(std::string &content,
-                       const std::string &sep,
-                       const std::string &entry,
-                       const std::string &fragment)
-{
-  content += sep + "$<$<TARGET_DEFINED:"
-                  + entry + ">:" + fragment + ">";
-  content += ";$<$<NOT:$<TARGET_DEFINED:"
-                  + entry + ">>:" + entry + ">";
-}
-
-//----------------------------------------------------------------------------
-void cmTargetPropCommandBase
 ::PopulateTargetProperies(const std::string &scope,
                           const std::string &content, bool prepend)
 {
diff --git a/Source/cmTargetPropCommandBase.h b/Source/cmTargetPropCommandBase.h
index 9b1e276..15a78c9 100644
--- a/Source/cmTargetPropCommandBase.h
+++ b/Source/cmTargetPropCommandBase.h
@@ -35,10 +35,10 @@ private:
   virtual void HandleImportedTarget(const std::string &tgt) = 0;
   virtual void HandleMissingTarget(const std::string &name) = 0;
 
-  virtual void HandleMaybeTargetArg(std::string &content,
-                                    const std::string &sep,
-                                    const std::string &entry,
-                                    const std::string &fragment);
+  virtual bool HandleNonTargetArg(std::string &content,
+                          const std::string &sep,
+                          const std::string &entry,
+                          const std::string &tgt) = 0;
 
   virtual void HandleDirectContent(cmTarget *tgt,
                                    const std::string &content,
diff --git a/Tests/ExportImport/Export/CMakeLists.txt b/Tests/ExportImport/Export/CMakeLists.txt
index 4448cd8..3f7206b 100644
--- a/Tests/ExportImport/Export/CMakeLists.txt
+++ b/Tests/ExportImport/Export/CMakeLists.txt
@@ -153,8 +153,6 @@ set_property(TARGET testLibRequired APPEND PROPERTY
     $<$<TARGET_DEFINED:no_a_target>:$<TARGET_PROPERTY:no_a_target,INTERFACE_INCLUDE_DIRECTORIES>>
 )
 
-target_compile_definitions(testLibRequired PUBLIC testSharedLibRequired)
-
 set_property(TARGET testLibRequired APPEND PROPERTY
   INTERFACE_COMPILE_DEFINITIONS
     testLibRequired_IFACE_DEFINE
@@ -193,7 +191,6 @@ set_property(TARGET testSharedLibRequired
   PROPERTY
     INTERFACE_CUSTOM_STRING testcontent
 )
-target_compile_definitions(testSharedLibRequired INTERFACE SOME_NON_TARGET_DEFINE)
 
 add_library(testSharedLibDepends SHARED testSharedLibDepends.cpp)
 set_property(TARGET testSharedLibDepends APPEND PROPERTY
diff --git a/Tests/ExportImport/Export/testLibRequired.c b/Tests/ExportImport/Export/testLibRequired.c
index e10383c..e126d44 100644
--- a/Tests/ExportImport/Export/testLibRequired.c
+++ b/Tests/ExportImport/Export/testLibRequired.c
@@ -1,6 +1 @@
-
-#ifndef SOME_NON_TARGET_DEFINE
-#error Expected SOME_NON_TARGET_DEFINE
-#endif
-
 int testLibRequired(void) { return 0; }

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

Summary of changes:
 Source/cmTargetCompileDefinitionsCommand.cxx |   10 ++++++
 Source/cmTargetCompileDefinitionsCommand.h   |    5 +++
 Source/cmTargetIncludeDirectoriesCommand.cxx |   23 ++++++++------
 Source/cmTargetIncludeDirectoriesCommand.h   |    8 ++--
 Source/cmTargetPropCommandBase.cxx           |   42 +++++---------------------
 Source/cmTargetPropCommandBase.h             |    8 ++--
 Tests/ExportImport/Export/CMakeLists.txt     |    3 --
 Tests/ExportImport/Export/testLibRequired.c  |    5 ---
 8 files changed, 44 insertions(+), 60 deletions(-)


hooks/post-receive
-- 
CMake


More information about the Cmake-commits mailing list