[Cmake-commits] CMake branch, next, updated. v2.8.10.2-1808-g05fc3fe

Stephen Kelly steveire at gmail.com
Tue Jan 29 12:49:27 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  05fc3fec44da8a6d99448e75094a9f686bf9ec11 (commit)
       via  71e80bde1177b523da305ac3a6c0f9749e0526fc (commit)
       via  f6b16d4b0642d26111cddff714b464e22b715482 (commit)
       via  b3a7e19ee479fda18b1dfe237fc4b78467c05fd7 (commit)
       via  61d641dccb216bd585430231e0851c6b6eab4343 (commit)
       via  e2afc40d0651e3762829fa911bfc11373afd092b (commit)
       via  00ba2545fabcb8ce7d62387464060634683282b9 (commit)
      from  a7e1dfd2af37d19dc4b5472c59239186ad9af098 (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=05fc3fec44da8a6d99448e75094a9f686bf9ec11
commit 05fc3fec44da8a6d99448e75094a9f686bf9ec11
Merge: a7e1dfd 71e80bd
Author:     Stephen Kelly <steveire at gmail.com>
AuthorDate: Tue Jan 29 12:49:24 2013 -0500
Commit:     CMake Topic Stage <kwrobot at kitware.com>
CommitDate: Tue Jan 29 12:49:24 2013 -0500

    Merge topic 'fix-target-property-commands' into next
    
    71e80bd Make subclasses responsible for joining content.
    f6b16d4 Don't allow targets args in the new target commands.
    b3a7e19 Make the Property name protected so that subclasses can use it.
    61d641d CMake Nightly Date Stamp
    e2afc40 CMake Nightly Date Stamp
    00ba254 CMake Nightly Date Stamp


http://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=71e80bde1177b523da305ac3a6c0f9749e0526fc
commit 71e80bde1177b523da305ac3a6c0f9749e0526fc
Author:     Stephen Kelly <steveire at gmail.com>
AuthorDate: Tue Jan 29 17:23:31 2013 +0100
Commit:     Stephen Kelly <steveire at gmail.com>
CommitDate: Tue Jan 29 18:48:53 2013 +0100

    Make subclasses responsible for joining content.
    
    This way we can add handling of relative/absolute paths and of
    -D in compile definitions.

diff --git a/Source/cmTargetCompileDefinitionsCommand.cxx b/Source/cmTargetCompileDefinitionsCommand.cxx
index 312d625..7645833 100644
--- a/Source/cmTargetCompileDefinitionsCommand.cxx
+++ b/Source/cmTargetCompileDefinitionsCommand.cxx
@@ -37,9 +37,32 @@ void cmTargetCompileDefinitionsCommand
   this->Makefile->IssueMessage(cmake::FATAL_ERROR, e.str());
 }
 
+//----------------------------------------------------------------------------
+std::string cmTargetCompileDefinitionsCommand
+::Join(const std::vector<std::string> &content)
+{
+  std::string defs;
+  std::string sep;
+  for(std::vector<std::string>::const_iterator it = content.begin();
+    it != content.end(); ++it)
+    {
+    if (strncmp(it->c_str(), "-D", 2) == 0)
+      {
+      defs += sep + it->substr(2);
+      }
+    else
+      {
+      defs += sep + *it;
+      }
+    sep = ";";
+    }
+  return defs;
+}
+
+//----------------------------------------------------------------------------
 void cmTargetCompileDefinitionsCommand
-::HandleDirectContent(cmTarget *tgt, const std::string &content,
+::HandleDirectContent(cmTarget *tgt, const std::vector<std::string> &content,
                                    bool)
 {
-  tgt->AppendProperty("COMPILE_DEFINITIONS", content.c_str());
+  tgt->AppendProperty("COMPILE_DEFINITIONS", this->Join(content).c_str());
 }
diff --git a/Source/cmTargetCompileDefinitionsCommand.h b/Source/cmTargetCompileDefinitionsCommand.h
index 6e8fc84..3b43820 100644
--- a/Source/cmTargetCompileDefinitionsCommand.h
+++ b/Source/cmTargetCompileDefinitionsCommand.h
@@ -81,8 +81,10 @@ private:
   virtual void HandleImportedTarget(const std::string &tgt);
   virtual void HandleMissingTarget(const std::string &name);
 
-  virtual void HandleDirectContent(cmTarget *tgt, const std::string &content,
+  virtual void HandleDirectContent(cmTarget *tgt,
+                                   const std::vector<std::string> &content,
                                    bool prepend);
+  virtual std::string Join(const std::vector<std::string> &content);
 };
 
 #endif
diff --git a/Source/cmTargetIncludeDirectoriesCommand.cxx b/Source/cmTargetIncludeDirectoriesCommand.cxx
index 51a2b6b..eaacfa9 100644
--- a/Source/cmTargetIncludeDirectoriesCommand.cxx
+++ b/Source/cmTargetIncludeDirectoriesCommand.cxx
@@ -41,12 +41,44 @@ void cmTargetIncludeDirectoriesCommand
 }
 
 //----------------------------------------------------------------------------
+static bool isGeneratorExpression(const std::string &lib)
+{
+  const std::string::size_type openpos = lib.find("$<");
+  return (openpos != std::string::npos)
+      && (lib.find(">", openpos) != std::string::npos);
+}
+
+//----------------------------------------------------------------------------
+std::string cmTargetIncludeDirectoriesCommand
+::Join(const std::vector<std::string> &content)
+{
+  std::string dirs;
+  std::string sep;
+  std::string prefix = this->Makefile->GetStartDirectory() + std::string("/");
+  for(std::vector<std::string>::const_iterator it = content.begin();
+    it != content.end(); ++it)
+    {
+    if (cmSystemTools::FileIsFullPath(it->c_str())
+        || isGeneratorExpression(*it))
+      {
+      dirs += sep + *it;
+      }
+    else
+      {
+      dirs += sep + prefix + *it;
+      }
+    sep = ";";
+    }
+  return dirs;
+}
+
+//----------------------------------------------------------------------------
 void cmTargetIncludeDirectoriesCommand
-::HandleDirectContent(cmTarget *tgt, const std::string &content,
+::HandleDirectContent(cmTarget *tgt, const std::vector<std::string> &content,
                       bool prepend)
 {
   cmListFileBacktrace lfbt;
   this->Makefile->GetBacktrace(lfbt);
-  cmMakefileIncludeDirectoriesEntry entry(content, lfbt);
+  cmMakefileIncludeDirectoriesEntry entry(this->Join(content), lfbt);
   tgt->InsertInclude(entry, prepend);
 }
diff --git a/Source/cmTargetIncludeDirectoriesCommand.h b/Source/cmTargetIncludeDirectoriesCommand.h
index a254878..d02cb4a 100644
--- a/Source/cmTargetIncludeDirectoriesCommand.h
+++ b/Source/cmTargetIncludeDirectoriesCommand.h
@@ -85,8 +85,10 @@ private:
   virtual void HandleImportedTarget(const std::string &tgt);
   virtual void HandleMissingTarget(const std::string &name);
 
-  virtual void HandleDirectContent(cmTarget *tgt, const std::string &content,
+  virtual void HandleDirectContent(cmTarget *tgt,
+                                   const std::vector<std::string> &content,
                                    bool prepend);
+  virtual std::string Join(const std::vector<std::string> &content);
 };
 
 #endif
diff --git a/Source/cmTargetPropCommandBase.cxx b/Source/cmTargetPropCommandBase.cxx
index ef40438..18a1d2a 100644
--- a/Source/cmTargetPropCommandBase.cxx
+++ b/Source/cmTargetPropCommandBase.cxx
@@ -88,9 +88,8 @@ bool cmTargetPropCommandBase
 
   ++argIndex;
 
-  std::string content;
+  std::vector<std::string> content;
 
-  std::string sep;
   for(unsigned int i=argIndex; i < args.size(); ++i, ++argIndex)
     {
     if(args[i] == "PUBLIC"
@@ -100,8 +99,7 @@ bool cmTargetPropCommandBase
       this->PopulateTargetProperies(scope, content, prepend);
       return true;
       }
-    content += sep + args[i];
-    sep = ";";
+    content.push_back(args[i]);
     }
   this->PopulateTargetProperies(scope, content, prepend);
   return true;
@@ -110,7 +108,8 @@ bool cmTargetPropCommandBase
 //----------------------------------------------------------------------------
 void cmTargetPropCommandBase
 ::PopulateTargetProperies(const std::string &scope,
-                          const std::string &content, bool prepend)
+                          const std::vector<std::string> &content,
+                          bool prepend)
 {
   if (scope == "PRIVATE" || scope == "PUBLIC")
     {
@@ -122,7 +121,7 @@ void cmTargetPropCommandBase
       {
       const std::string propName = std::string("INTERFACE_") + this->Property;
       const char *propValue = this->Target->GetProperty(propName.c_str());
-      const std::string totalContent = content + (propValue
+      const std::string totalContent = this->Join(content) + (propValue
                                                 ? std::string(";") + propValue
                                                 : std::string());
       this->Target->SetProperty(propName.c_str(), totalContent.c_str());
@@ -130,7 +129,7 @@ void cmTargetPropCommandBase
     else
       {
       this->Target->AppendProperty(("INTERFACE_" + this->Property).c_str(),
-                            content.c_str());
+                                   this->Join(content).c_str());
       }
     }
 }
diff --git a/Source/cmTargetPropCommandBase.h b/Source/cmTargetPropCommandBase.h
index cc9897d..709fab7 100644
--- a/Source/cmTargetPropCommandBase.h
+++ b/Source/cmTargetPropCommandBase.h
@@ -33,22 +33,21 @@ public:
 
 protected:
   std::string Property;
+  cmTarget *Target;
 
 private:
   virtual void HandleImportedTarget(const std::string &tgt) = 0;
   virtual void HandleMissingTarget(const std::string &name) = 0;
 
   virtual void HandleDirectContent(cmTarget *tgt,
-                                   const std::string &content,
+                                   const std::vector<std::string> &content,
                                    bool prepend) = 0;
+  virtual std::string Join(const std::vector<std::string> &content) = 0;
 
   bool ProcessContentArgs(std::vector<std::string> const& args,
                           unsigned int &argIndex, bool prepend);
   void PopulateTargetProperies(const std::string &scope,
-                               const std::string &content, bool prepend);
-
-private:
-  cmTarget *Target;
+                               const std::vector<std::string> &content, bool prepend);
 };
 
 #endif
diff --git a/Tests/CMakeCommands/target_compile_definitions/CMakeLists.txt b/Tests/CMakeCommands/target_compile_definitions/CMakeLists.txt
index 00cba44..8a4437b 100644
--- a/Tests/CMakeCommands/target_compile_definitions/CMakeLists.txt
+++ b/Tests/CMakeCommands/target_compile_definitions/CMakeLists.txt
@@ -20,4 +20,5 @@ target_compile_definitions(consumer
   PRIVATE $<TARGET_PROPERTY:target_compile_definitions,INTERFACE_COMPILE_DEFINITIONS>
   $<$<TARGET_DEFINED:notdefined>:SHOULD_NOT_BE_DEFINED>
   $<$<TARGET_DEFINED:target_compile_definitions>:SHOULD_BE_DEFINED>
+  -DDASH_D_DEFINE
 )
diff --git a/Tests/CMakeCommands/target_compile_definitions/consumer.cpp b/Tests/CMakeCommands/target_compile_definitions/consumer.cpp
index f835b6c..1a46aa5 100644
--- a/Tests/CMakeCommands/target_compile_definitions/consumer.cpp
+++ b/Tests/CMakeCommands/target_compile_definitions/consumer.cpp
@@ -19,4 +19,8 @@
 #error Expected SHOULD_BE_DEFINED
 #endif
 
+#ifndef DASH_D_DEFINE
+#error Expected DASH_D_DEFINE
+#endif
+
 int main() { return 0; }
diff --git a/Tests/CMakeCommands/target_include_directories/CMakeLists.txt b/Tests/CMakeCommands/target_include_directories/CMakeLists.txt
index 89b61f3..7529283 100644
--- a/Tests/CMakeCommands/target_include_directories/CMakeLists.txt
+++ b/Tests/CMakeCommands/target_include_directories/CMakeLists.txt
@@ -44,4 +44,5 @@ add_executable(consumer
 
 target_include_directories(consumer
   PRIVATE $<TARGET_PROPERTY:target_include_directories,INTERFACE_INCLUDE_DIRECTORIES>
+  relative_dir
 )
diff --git a/Tests/CMakeCommands/target_include_directories/consumer.cpp b/Tests/CMakeCommands/target_include_directories/consumer.cpp
index 5d88488..82b800a 100644
--- a/Tests/CMakeCommands/target_include_directories/consumer.cpp
+++ b/Tests/CMakeCommands/target_include_directories/consumer.cpp
@@ -2,6 +2,7 @@
 #include "common.h"
 #include "publicinclude.h"
 #include "interfaceinclude.h"
+#include "relative_dir.h"
 
 #ifdef PRIVATEINCLUDE_DEFINE
 #error Unexpected PRIVATEINCLUDE_DEFINE
@@ -19,4 +20,8 @@
 #error Expected CURE_DEFINE
 #endif
 
+#ifndef RELATIVE_DIR_DEFINE
+#error Expected RELATIVE_DIR_DEFINE
+#endif
+
 int main() { return 0; }
diff --git a/Tests/CMakeCommands/target_include_directories/relative_dir/relative_dir.h b/Tests/CMakeCommands/target_include_directories/relative_dir/relative_dir.h
new file mode 100644
index 0000000..7017b61
--- /dev/null
+++ b/Tests/CMakeCommands/target_include_directories/relative_dir/relative_dir.h
@@ -0,0 +1,2 @@
+
+#define RELATIVE_DIR_DEFINE

http://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=f6b16d4b0642d26111cddff714b464e22b715482
commit f6b16d4b0642d26111cddff714b464e22b715482
Author:     Stephen Kelly <steveire at gmail.com>
AuthorDate: Tue Jan 29 17:43:28 2013 +0100
Commit:     Stephen Kelly <steveire at gmail.com>
CommitDate: Tue Jan 29 18:44:54 2013 +0100

    Don't allow targets args in the new target commands.

diff --git a/Source/cmTargetCompileDefinitionsCommand.cxx b/Source/cmTargetCompileDefinitionsCommand.cxx
index 683eff6..312d625 100644
--- a/Source/cmTargetCompileDefinitionsCommand.cxx
+++ b/Source/cmTargetCompileDefinitionsCommand.cxx
@@ -37,16 +37,6 @@ 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 d49b9e8..6e8fc84 100644
--- a/Source/cmTargetCompileDefinitionsCommand.h
+++ b/Source/cmTargetCompileDefinitionsCommand.h
@@ -81,11 +81,6 @@ 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 aeba468..51a2b6b 100644
--- a/Source/cmTargetIncludeDirectoriesCommand.cxx
+++ b/Source/cmTargetIncludeDirectoriesCommand.cxx
@@ -41,26 +41,6 @@ void cmTargetIncludeDirectoriesCommand
 }
 
 //----------------------------------------------------------------------------
-bool cmTargetIncludeDirectoriesCommand
-::HandleNonTargetArg(std::string &content,
-                   const std::string &sep,
-                   const std::string &entry,
-                   const std::string &tgt)
-{
-  if (!cmSystemTools::FileIsFullPath(entry.c_str()))
-    {
-    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;
-}
-
-//----------------------------------------------------------------------------
 void cmTargetIncludeDirectoriesCommand
 ::HandleDirectContent(cmTarget *tgt, const std::string &content,
                       bool prepend)
diff --git a/Source/cmTargetIncludeDirectoriesCommand.h b/Source/cmTargetIncludeDirectoriesCommand.h
index 5a5f859..a254878 100644
--- a/Source/cmTargetIncludeDirectoriesCommand.h
+++ b/Source/cmTargetIncludeDirectoriesCommand.h
@@ -85,11 +85,6 @@ 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/cmTargetPropCommandBase.cxx b/Source/cmTargetPropCommandBase.cxx
index e1eb1d2..ef40438 100644
--- a/Source/cmTargetPropCommandBase.cxx
+++ b/Source/cmTargetPropCommandBase.cxx
@@ -66,14 +66,6 @@ bool cmTargetPropCommandBase
 }
 
 //----------------------------------------------------------------------------
-static bool isGeneratorExpression(const std::string &lib)
-{
-  const std::string::size_type openpos = lib.find("$<");
-  return (openpos != std::string::npos)
-      && (lib.find(">", openpos) != std::string::npos);
-}
-
-//----------------------------------------------------------------------------
 bool cmTargetPropCommandBase
 ::ProcessContentArgs(std::vector<std::string> const& args,
                      unsigned int &argIndex, bool prepend)
@@ -108,19 +100,7 @@ bool cmTargetPropCommandBase
       this->PopulateTargetProperies(scope, content, prepend);
       return true;
       }
-    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 if (!this->HandleNonTargetArg(content, sep, args[i], args[0]))
-      {
-      return false;
-      }
+    content += sep + args[i];
     sep = ";";
     }
   this->PopulateTargetProperies(scope, content, prepend);
diff --git a/Source/cmTargetPropCommandBase.h b/Source/cmTargetPropCommandBase.h
index 0289c44..cc9897d 100644
--- a/Source/cmTargetPropCommandBase.h
+++ b/Source/cmTargetPropCommandBase.h
@@ -38,11 +38,6 @@ private:
   virtual void HandleImportedTarget(const std::string &tgt) = 0;
   virtual void HandleMissingTarget(const std::string &name) = 0;
 
-  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,
                                    bool prepend) = 0;
diff --git a/Tests/CMakeCommands/target_compile_definitions/CMakeLists.txt b/Tests/CMakeCommands/target_compile_definitions/CMakeLists.txt
index 3eca7fc..00cba44 100644
--- a/Tests/CMakeCommands/target_compile_definitions/CMakeLists.txt
+++ b/Tests/CMakeCommands/target_compile_definitions/CMakeLists.txt
@@ -17,7 +17,7 @@ add_executable(consumer
 )
 
 target_compile_definitions(consumer
-  PRIVATE target_compile_definitions importedlib
+  PRIVATE $<TARGET_PROPERTY:target_compile_definitions,INTERFACE_COMPILE_DEFINITIONS>
   $<$<TARGET_DEFINED:notdefined>:SHOULD_NOT_BE_DEFINED>
   $<$<TARGET_DEFINED:target_compile_definitions>:SHOULD_BE_DEFINED>
 )
diff --git a/Tests/CMakeCommands/target_include_directories/CMakeLists.txt b/Tests/CMakeCommands/target_include_directories/CMakeLists.txt
index e190161..89b61f3 100644
--- a/Tests/CMakeCommands/target_include_directories/CMakeLists.txt
+++ b/Tests/CMakeCommands/target_include_directories/CMakeLists.txt
@@ -43,5 +43,5 @@ add_executable(consumer
 )
 
 target_include_directories(consumer
-  PRIVATE target_include_directories
+  PRIVATE $<TARGET_PROPERTY:target_include_directories,INTERFACE_INCLUDE_DIRECTORIES>
 )
diff --git a/Tests/ExportImport/Import/A/CMakeLists.txt b/Tests/ExportImport/Import/A/CMakeLists.txt
index 187c48a..e9bd2ba 100644
--- a/Tests/ExportImport/Import/A/CMakeLists.txt
+++ b/Tests/ExportImport/Import/A/CMakeLists.txt
@@ -159,15 +159,18 @@ endif()
 
 add_executable(deps_iface deps_iface.c)
 target_link_libraries(deps_iface testLibDepends)
-target_include_directories(deps_iface PRIVATE testLibDepends)
-target_compile_definitions(deps_iface PRIVATE testLibDepends)
+target_include_directories(deps_iface PRIVATE $<TARGET_PROPERTY:testLibDepends,INTERFACE_INCLUDE_DIRECTORIES>)
+target_compile_definitions(deps_iface PRIVATE $<TARGET_PROPERTY:testLibDepends,INTERFACE_COMPILE_DEFINITIONS>)
 
 add_executable(deps_shared_iface deps_shared_iface.cpp)
 target_link_libraries(deps_shared_iface testSharedLibDepends)
-target_include_directories(deps_shared_iface PRIVATE testSharedLibDepends)
+target_include_directories(deps_shared_iface
+  PRIVATE
+    $<TARGET_PROPERTY:testSharedLibDepends,INTERFACE_INCLUDE_DIRECTORIES>
+)
 target_compile_definitions(deps_shared_iface
   PRIVATE
-    testSharedLibDepends
+    $<TARGET_PROPERTY:testSharedLibDepends,INTERFACE_COMPILE_DEFINITIONS>
     $<$<BOOL:$<TARGET_PROPERTY:POSITION_INDEPENDENT_CODE>>:PIC_PROPERTY_IS_ON>
     $<$<BOOL:$<TARGET_PROPERTY:CUSTOM_PROP>>:CUSTOM_PROPERTY_IS_ON>
     $<$<STREQUAL:$<TARGET_PROPERTY:CUSTOM_STRING>,testcontent>:CUSTOM_STRING_IS_MATCH>
@@ -197,9 +200,13 @@ endif()
 
 add_executable(deps_shared_iface2 deps_shared_iface.cpp)
 target_link_libraries(deps_shared_iface2 bld_testSharedLibDepends bld_subdirlib)
-target_include_directories(deps_shared_iface2 PRIVATE bld_testSharedLibDepends bld_subdirlib)
+target_include_directories(deps_shared_iface2
+  PRIVATE
+    $<TARGET_PROPERTY:bld_testSharedLibDepends,INTERFACE_INCLUDE_DIRECTORIES>
+    $<TARGET_PROPERTY:bld_subdirlib,INTERFACE_INCLUDE_DIRECTORIES>
+)
 target_compile_definitions(deps_shared_iface2
-  PRIVATE bld_testSharedLibDepends TEST_SUBDIR_LIB
+  PRIVATE $<TARGET_PROPERTY:bld_testSharedLibDepends,INTERFACE_COMPILE_DEFINITIONS> TEST_SUBDIR_LIB
   $<$<BOOL:$<TARGET_PROPERTY:POSITION_INDEPENDENT_CODE>>:PIC_PROPERTY_IS_ON>
   $<$<BOOL:$<TARGET_PROPERTY:CUSTOM_PROP>>:CUSTOM_PROPERTY_IS_ON>
   $<$<STREQUAL:$<TARGET_PROPERTY:CUSTOM_STRING>,testcontent>:CUSTOM_STRING_IS_MATCH>

http://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=b3a7e19ee479fda18b1dfe237fc4b78467c05fd7
commit b3a7e19ee479fda18b1dfe237fc4b78467c05fd7
Author:     Stephen Kelly <steveire at gmail.com>
AuthorDate: Tue Jan 29 17:20:45 2013 +0100
Commit:     Stephen Kelly <steveire at gmail.com>
CommitDate: Tue Jan 29 17:20:45 2013 +0100

    Make the Property name protected so that subclasses can use it.
    
    Makes subclasses more dry in upcoming patches.

diff --git a/Source/cmTargetPropCommandBase.h b/Source/cmTargetPropCommandBase.h
index 15a78c9..0289c44 100644
--- a/Source/cmTargetPropCommandBase.h
+++ b/Source/cmTargetPropCommandBase.h
@@ -31,6 +31,9 @@ public:
   bool HandleArguments(std::vector<std::string> const& args,
                            const char *prop, ArgumentFlags flags = NO_FLAGS);
 
+protected:
+  std::string Property;
+
 private:
   virtual void HandleImportedTarget(const std::string &tgt) = 0;
   virtual void HandleMissingTarget(const std::string &name) = 0;
@@ -51,7 +54,6 @@ private:
 
 private:
   cmTarget *Target;
-  std::string Property;
 };
 
 #endif

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

Summary of changes:
 Source/CMakeVersion.cmake                          |    2 +-
 Source/cmTargetCompileDefinitionsCommand.cxx       |   31 ++++++++++----
 Source/cmTargetCompileDefinitionsCommand.h         |    9 +---
 Source/cmTargetIncludeDirectoriesCommand.cxx       |   44 ++++++++++++-------
 Source/cmTargetIncludeDirectoriesCommand.h         |    9 +---
 Source/cmTargetPropCommandBase.cxx                 |   33 +++------------
 Source/cmTargetPropCommandBase.h                   |   18 +++-----
 .../target_compile_definitions/CMakeLists.txt      |    3 +-
 .../target_compile_definitions/consumer.cpp        |    4 ++
 .../target_include_directories/CMakeLists.txt      |    3 +-
 .../target_include_directories/consumer.cpp        |    5 ++
 .../relative_dir/relative_dir.h                    |    2 +
 Tests/ExportImport/Import/A/CMakeLists.txt         |   19 ++++++---
 13 files changed, 98 insertions(+), 84 deletions(-)
 create mode 100644 Tests/CMakeCommands/target_include_directories/relative_dir/relative_dir.h


hooks/post-receive
-- 
CMake


More information about the Cmake-commits mailing list