[Cmake-commits] CMake branch, next, updated. v2.8.11.2-3141-g966f5dc

Stephen Kelly steveire at gmail.com
Mon Jul 15 20:24:36 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  966f5dc5b42d90fe44edfd9c9bc0a0e921b65986 (commit)
       via  451acd95c83ae388d28a7f9c08aee8851095dbbb (commit)
       via  384768e51d32caed03503468328d81ba2c324e14 (commit)
      from  dd108723a889fec7141ccb527be3aff92551a4fb (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=966f5dc5b42d90fe44edfd9c9bc0a0e921b65986
commit 966f5dc5b42d90fe44edfd9c9bc0a0e921b65986
Merge: dd10872 451acd9
Author:     Stephen Kelly <steveire at gmail.com>
AuthorDate: Mon Jul 15 20:24:07 2013 -0400
Commit:     CMake Topic Stage <kwrobot at kitware.com>
CommitDate: Mon Jul 15 20:24:07 2013 -0400

    Merge topic 'install-interface-includes' into next
    
    451acd9 Revert "Add a convenient way to add the includes install dir to the INTERFACE."
    384768e Revert "Export the INCLUDES DESTINATION without appending to the target."

diff --cc Source/cmExportInstallFileGenerator.cxx
index c97d4ff,a966b16..ce7afc5
--- a/Source/cmExportInstallFileGenerator.cxx
+++ b/Source/cmExportInstallFileGenerator.cxx
@@@ -113,9 -113,8 +113,9 @@@ bool cmExportInstallFileGenerator::Gene
  
    std::vector<std::string> missingTargets;
  
 +  bool require2_8_12 = false;
    // Create all the imported targets.
-   for(std::vector<cmTargetExport*>::const_iterator
+   for(std::vector<cmTarget*>::const_iterator
          tei = allTargets.begin();
        tei != allTargets.end(); ++tei)
      {
@@@ -124,13 -123,9 +124,13 @@@
  
      ImportPropertyMap properties;
  
-     this->PopulateIncludeDirectoriesInterface(*tei,
+     this->PopulateIncludeDirectoriesInterface(te,
                                    cmGeneratorExpression::InstallInterface,
                                    properties, missingTargets);
 +    this->PopulateInterfaceProperty("INTERFACE_SYSTEM_INCLUDE_DIRECTORIES",
 +                                  te,
 +                                  cmGeneratorExpression::InstallInterface,
 +                                  properties, missingTargets);
      this->PopulateInterfaceProperty("INTERFACE_COMPILE_DEFINITIONS",
                                    te,
                                    cmGeneratorExpression::InstallInterface,

http://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=451acd95c83ae388d28a7f9c08aee8851095dbbb
commit 451acd95c83ae388d28a7f9c08aee8851095dbbb
Author:     Stephen Kelly <steveire at gmail.com>
AuthorDate: Tue Jul 16 02:23:11 2013 +0200
Commit:     Stephen Kelly <steveire at gmail.com>
CommitDate: Tue Jul 16 02:23:11 2013 +0200

    Revert "Add a convenient way to add the includes install dir to the INTERFACE."
    
    This reverts commit 537ab88be837f33903663afcbe9da33f13c727a1.

diff --git a/Source/cmInstallCommand.cxx b/Source/cmInstallCommand.cxx
index 376b6f1..dcd418b 100644
--- a/Source/cmInstallCommand.cxx
+++ b/Source/cmInstallCommand.cxx
@@ -219,7 +219,6 @@ bool cmInstallCommand::HandleTargetsMode(std::vector<std::string> const& args)
   cmCAStringVector runtimeArgVector      (&argHelper,"RUNTIME",&group);
   cmCAStringVector frameworkArgVector    (&argHelper,"FRAMEWORK",&group);
   cmCAStringVector bundleArgVector       (&argHelper,"BUNDLE",&group);
-  cmCAStringVector includesArgVector     (&argHelper,"INCLUDES",&group);
   cmCAStringVector privateHeaderArgVector(&argHelper,"PRIVATE_HEADER",&group);
   cmCAStringVector publicHeaderArgVector (&argHelper,"PUBLIC_HEADER",&group);
   cmCAStringVector resourceArgVector     (&argHelper,"RESOURCE",&group);
@@ -248,7 +247,6 @@ bool cmInstallCommand::HandleTargetsMode(std::vector<std::string> const& args)
   cmInstallCommandArguments privateHeaderArgs(this->DefaultComponentName);
   cmInstallCommandArguments publicHeaderArgs(this->DefaultComponentName);
   cmInstallCommandArguments resourceArgs(this->DefaultComponentName);
-  cmInstallCommandIncludesArgument includesArgs;
 
   // now parse the args for specific parts of the target (e.g. LIBRARY,
   // RUNTIME, ARCHIVE etc.
@@ -260,7 +258,6 @@ bool cmInstallCommand::HandleTargetsMode(std::vector<std::string> const& args)
   privateHeaderArgs.Parse(&privateHeaderArgVector.GetVector(), &unknownArgs);
   publicHeaderArgs.Parse (&publicHeaderArgVector.GetVector(),  &unknownArgs);
   resourceArgs.Parse     (&resourceArgVector.GetVector(),      &unknownArgs);
-  includesArgs.Parse     (&includesArgVector.GetVector(),      &unknownArgs);
 
   if(!unknownArgs.empty())
     {
@@ -386,21 +383,6 @@ bool cmInstallCommand::HandleTargetsMode(std::vector<std::string> const& args)
         this->SetError(e.str().c_str());
         return false;
         }
-      std::vector<std::string> dirs = includesArgs.GetIncludeDirs();
-      if(!dirs.empty())
-        {
-        std::string dirString;
-        const char *sep = "";
-        for (std::vector<std::string>::const_iterator it = dirs.begin();
-            it != dirs.end(); ++it)
-          {
-          dirString += sep;
-          dirString += *it;
-          sep = ";";
-          }
-        target->AppendProperty("INTERFACE_INCLUDE_DIRECTORIES",
-          ("$<INSTALL_INTERFACE:" + dirString + ">").c_str());
-        }
       // Store the target in the list to be installed.
       targets.push_back(target);
       }
diff --git a/Source/cmInstallCommand.h b/Source/cmInstallCommand.h
index cb937dd..7c06009 100644
--- a/Source/cmInstallCommand.h
+++ b/Source/cmInstallCommand.h
@@ -102,7 +102,6 @@ public:
       "          [[ARCHIVE|LIBRARY|RUNTIME|FRAMEWORK|BUNDLE|\n"
       "            PRIVATE_HEADER|PUBLIC_HEADER|RESOURCE]\n"
       "           [DESTINATION <dir>]\n"
-      "           [INCLUDES DESTINATION [<dir> ...]]\n"
       "           [PERMISSIONS permissions...]\n"
       "           [CONFIGURATIONS [Debug|Release|...]]\n"
       "           [COMPONENT <component>]\n"
@@ -131,10 +130,6 @@ public:
       "all target types.  If only one is given then only targets of that "
       "type will be installed (which can be used to install just a DLL or "
       "just an import library)."
-      "The INCLUDES DESTINATION specifies a list of directories which will "
-      "be added to the INTERFACE_INCLUDE_DIRECTORIES of the <targets> when "
-      "exported by install(EXPORT).  If a relative path is specified, it is "
-      "treated as relative to the $<INSTALL_PREFIX>."
       "\n"
       "The PRIVATE_HEADER, PUBLIC_HEADER, and RESOURCE arguments cause "
       "subsequent properties to be applied to installing a FRAMEWORK "
diff --git a/Source/cmInstallCommandArguments.cxx b/Source/cmInstallCommandArguments.cxx
index 91ea861..8e48f08 100644
--- a/Source/cmInstallCommandArguments.cxx
+++ b/Source/cmInstallCommandArguments.cxx
@@ -203,37 +203,3 @@ bool cmInstallCommandArguments::CheckPermissions(
   // This is not a valid permission.
   return false;
 }
-
-cmInstallCommandIncludesArgument::cmInstallCommandIncludesArgument()
-{
-
-}
-
-const std::vector<std::string>&
-cmInstallCommandIncludesArgument::GetIncludeDirs() const
-{
-  return this->IncludeDirs;
-}
-
-void cmInstallCommandIncludesArgument::Parse(
-                                        const std::vector<std::string>* args,
-                                        std::vector<std::string>*)
-{
-  if(args->empty())
-    {
-    return;
-    }
-  std::vector<std::string>::const_iterator it = args->begin();
-  ++it;
-  for ( ; it != args->end(); ++it)
-    {
-    std::string dir = *it;
-    if (!cmSystemTools::FileIsFullPath(it->c_str())
-        && cmGeneratorExpression::Find(*it) == std::string::npos)
-      {
-      dir = "$<INSTALL_PREFIX>/" + dir;
-      }
-    cmSystemTools::ConvertToUnixSlashes(dir);
-    this->IncludeDirs.push_back(dir);
-    }
-}
diff --git a/Source/cmInstallCommandArguments.h b/Source/cmInstallCommandArguments.h
index 90347e6..01f7d56 100644
--- a/Source/cmInstallCommandArguments.h
+++ b/Source/cmInstallCommandArguments.h
@@ -65,17 +65,4 @@ class cmInstallCommandArguments
     bool CheckPermissions();
 };
 
-class cmInstallCommandIncludesArgument
-{
-  public:
-    cmInstallCommandIncludesArgument();
-    void Parse(const std::vector<std::string>* args,
-               std::vector<std::string>* unconsumedArgs);
-
-    const std::vector<std::string>& GetIncludeDirs() const;
-
-  private:
-    std::vector<std::string> IncludeDirs;
-};
-
 #endif
diff --git a/Tests/ExportImport/Export/CMakeLists.txt b/Tests/ExportImport/Export/CMakeLists.txt
index dd60b47..efecd03 100644
--- a/Tests/ExportImport/Export/CMakeLists.txt
+++ b/Tests/ExportImport/Export/CMakeLists.txt
@@ -240,26 +240,9 @@ install(TARGETS testLibRequired
                 testLibIncludeRequired5
                 testLibIncludeRequired6
                 testSharedLibRequired
-        EXPORT RequiredExp DESTINATION lib
-        INCLUDES DESTINATION
-          installIncludesTest
-          $<INSTALL_PREFIX>/installIncludesTest2)
+        EXPORT RequiredExp DESTINATION lib )
 install(EXPORT RequiredExp NAMESPACE Req:: FILE testLibRequiredTargets.cmake DESTINATION lib/cmake/testLibRequired)
 
-file(MAKE_DIRECTORY "${CMAKE_CURRENT_BINARY_DIR}/installIncludesTest")
-file(WRITE "${CMAKE_CURRENT_BINARY_DIR}/installIncludesTest/installIncludesTest.h" "// No content\n")
-
-file(MAKE_DIRECTORY "${CMAKE_CURRENT_BINARY_DIR}/installIncludesTest2")
-file(WRITE "${CMAKE_CURRENT_BINARY_DIR}/installIncludesTest2/installIncludesTest2.h" "// No content\n")
-install(FILES
-  "${CMAKE_CURRENT_BINARY_DIR}/installIncludesTest/installIncludesTest.h"
-  DESTINATION installIncludesTest
-)
-install(FILES
-  "${CMAKE_CURRENT_BINARY_DIR}/installIncludesTest2/installIncludesTest2.h"
-  DESTINATION installIncludesTest2
-)
-
 install(TARGETS testLibDepends testSharedLibDepends EXPORT DependsExp DESTINATION lib )
 install(EXPORT DependsExp FILE testLibDependsTargets.cmake DESTINATION lib/cmake/testLibDepends)
 
diff --git a/Tests/ExportImport/Import/A/deps_iface.c b/Tests/ExportImport/Import/A/deps_iface.c
index d9dc331..e73ca26 100644
--- a/Tests/ExportImport/Import/A/deps_iface.c
+++ b/Tests/ExportImport/Import/A/deps_iface.c
@@ -3,9 +3,6 @@
 #include "testLibIncludeRequired2.h"
 #include "testLibIncludeRequired6.h"
 
-#include "installIncludesTest.h"
-#include "installIncludesTest2.h"
-
 #ifndef testLibRequired_IFACE_DEFINE
 #error Expected testLibRequired_IFACE_DEFINE
 #endif

http://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=384768e51d32caed03503468328d81ba2c324e14
commit 384768e51d32caed03503468328d81ba2c324e14
Author:     Stephen Kelly <steveire at gmail.com>
AuthorDate: Tue Jul 16 02:23:07 2013 +0200
Commit:     Stephen Kelly <steveire at gmail.com>
CommitDate: Tue Jul 16 02:23:07 2013 +0200

    Revert "Export the INCLUDES DESTINATION without appending to the target."
    
    This reverts commit 2e18259d1622806808d4d6e0372596ed136941a4.

diff --git a/Source/cmExportFileGenerator.cxx b/Source/cmExportFileGenerator.cxx
index 8d5e26f..6bef017 100644
--- a/Source/cmExportFileGenerator.cxx
+++ b/Source/cmExportFileGenerator.cxx
@@ -243,31 +243,27 @@ static bool checkInterfaceDirs(const std::string &prepro,
 
 //----------------------------------------------------------------------------
 void cmExportFileGenerator::PopulateIncludeDirectoriesInterface(
-                      cmTargetExport *tei,
+                      cmTarget *target,
                       cmGeneratorExpression::PreprocessContext preprocessRule,
                       ImportPropertyMap &properties,
                       std::vector<std::string> &missingTargets)
 {
-  cmTarget *target = tei->Target;
   assert(preprocessRule == cmGeneratorExpression::InstallInterface);
 
   const char *propName = "INTERFACE_INCLUDE_DIRECTORIES";
   const char *input = target->GetProperty(propName);
-  if (!input && tei->InterfaceIncludeDirectories.empty())
+  if (!input)
     {
     return;
     }
-  if (!*input && tei->InterfaceIncludeDirectories.empty())
+  if (!*input)
     {
     // Set to empty
     properties[propName] = "";
     return;
     }
 
-  std::string includes = (input?input:"");
-  const char* sep = input ? ";" : "";
-  includes += sep + tei->InterfaceIncludeDirectories;
-  std::string prepro = cmGeneratorExpression::Preprocess(includes,
+  std::string prepro = cmGeneratorExpression::Preprocess(input,
                                                           preprocessRule);
   if (!prepro.empty())
     {
diff --git a/Source/cmExportFileGenerator.h b/Source/cmExportFileGenerator.h
index 3d3d6e1..ed2d93b 100644
--- a/Source/cmExportFileGenerator.h
+++ b/Source/cmExportFileGenerator.h
@@ -15,8 +15,6 @@
 #include "cmCommand.h"
 #include "cmGeneratorExpression.h"
 
-class cmTargetExport;
-
 /** \class cmExportFileGenerator
  * \brief Generate a file exporting targets from a build or install tree.
  *
@@ -110,7 +108,7 @@ protected:
   void GenerateInterfaceProperties(cmTarget *target, std::ostream& os,
                                    const ImportPropertyMap &properties);
   void PopulateIncludeDirectoriesInterface(
-                      cmTargetExport *target,
+                      cmTarget *target,
                       cmGeneratorExpression::PreprocessContext preprocessRule,
                       ImportPropertyMap &properties,
                       std::vector<std::string> &missingTargets);
diff --git a/Source/cmExportInstallFileGenerator.cxx b/Source/cmExportInstallFileGenerator.cxx
index d01f5b6..a966b16 100644
--- a/Source/cmExportInstallFileGenerator.cxx
+++ b/Source/cmExportInstallFileGenerator.cxx
@@ -39,7 +39,7 @@ std::string cmExportInstallFileGenerator::GetConfigImportFileGlob()
 //----------------------------------------------------------------------------
 bool cmExportInstallFileGenerator::GenerateMainFile(std::ostream& os)
 {
-  std::vector<cmTargetExport*> allTargets;
+  std::vector<cmTarget*> allTargets;
   {
   std::string expectedTargets;
   std::string sep;
@@ -49,10 +49,10 @@ bool cmExportInstallFileGenerator::GenerateMainFile(std::ostream& os)
     {
     expectedTargets += sep + this->Namespace + (*tei)->Target->GetExportName();
     sep = " ";
-    cmTargetExport * te = *tei;
+    cmTargetExport const* te = *tei;
     if(this->ExportedTargets.insert(te->Target).second)
       {
-      allTargets.push_back(te);
+      allTargets.push_back(te->Target);
       }
     else
       {
@@ -114,16 +114,16 @@ bool cmExportInstallFileGenerator::GenerateMainFile(std::ostream& os)
   std::vector<std::string> missingTargets;
 
   // Create all the imported targets.
-  for(std::vector<cmTargetExport*>::const_iterator
+  for(std::vector<cmTarget*>::const_iterator
         tei = allTargets.begin();
       tei != allTargets.end(); ++tei)
     {
-    cmTarget* te = (*tei)->Target;
+    cmTarget* te = *tei;
     this->GenerateImportTargetCode(os, te);
 
     ImportPropertyMap properties;
 
-    this->PopulateIncludeDirectoriesInterface(*tei,
+    this->PopulateIncludeDirectoriesInterface(te,
                                   cmGeneratorExpression::InstallInterface,
                                   properties, missingTargets);
     this->PopulateInterfaceProperty("INTERFACE_COMPILE_DEFINITIONS",
diff --git a/Source/cmInstallCommand.cxx b/Source/cmInstallCommand.cxx
index 550d43b..376b6f1 100644
--- a/Source/cmInstallCommand.cxx
+++ b/Source/cmInstallCommand.cxx
@@ -386,6 +386,21 @@ bool cmInstallCommand::HandleTargetsMode(std::vector<std::string> const& args)
         this->SetError(e.str().c_str());
         return false;
         }
+      std::vector<std::string> dirs = includesArgs.GetIncludeDirs();
+      if(!dirs.empty())
+        {
+        std::string dirString;
+        const char *sep = "";
+        for (std::vector<std::string>::const_iterator it = dirs.begin();
+            it != dirs.end(); ++it)
+          {
+          dirString += sep;
+          dirString += *it;
+          sep = ";";
+          }
+        target->AppendProperty("INTERFACE_INCLUDE_DIRECTORIES",
+          ("$<INSTALL_INTERFACE:" + dirString + ">").c_str());
+        }
       // Store the target in the list to be installed.
       targets.push_back(target);
       }
@@ -750,20 +765,6 @@ bool cmInstallCommand::HandleTargetsMode(std::vector<std::string> const& args)
       te->RuntimeGenerator = runtimeGenerator;
       this->Makefile->GetLocalGenerator()->GetGlobalGenerator()
         ->GetExportSets()[exports.GetString()]->AddTargetExport(te);
-
-      std::vector<std::string> dirs = includesArgs.GetIncludeDirs();
-      if(!dirs.empty())
-        {
-        std::string dirString;
-        const char *sep = "";
-        for (std::vector<std::string>::const_iterator it = dirs.begin();
-            it != dirs.end(); ++it)
-          {
-          te->InterfaceIncludeDirectories += sep;
-          te->InterfaceIncludeDirectories += *it;
-          sep = ";";
-          }
-        }
       }
     }
 
diff --git a/Source/cmTargetExport.h b/Source/cmTargetExport.h
index 7665888..c9d87fb 100644
--- a/Source/cmTargetExport.h
+++ b/Source/cmTargetExport.h
@@ -12,8 +12,6 @@
 #ifndef cmTargetExport_h
 #define cmTargetExport_h
 
-#include "cmStandardIncludes.h"
-
 class cmTarget;
 class cmInstallTargetGenerator;
 class cmInstallFilesGenerator;
@@ -35,7 +33,6 @@ public:
   cmInstallTargetGenerator* FrameworkGenerator;
   cmInstallTargetGenerator* BundleGenerator;
   cmInstallFilesGenerator* HeaderGenerator;
-  std::string InterfaceIncludeDirectories;
   ///@}
 };
 

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

Summary of changes:
 Source/cmExportFileGenerator.cxx        |   12 ++++--------
 Source/cmExportFileGenerator.h          |    4 +---
 Source/cmExportInstallFileGenerator.cxx |   12 ++++++------
 Source/cmInstallCommand.cxx             |   14 --------------
 Source/cmTargetExport.h                 |    3 ---
 5 files changed, 11 insertions(+), 34 deletions(-)


hooks/post-receive
-- 
CMake


More information about the Cmake-commits mailing list