[Cmake-commits] CMake branch, next, updated. v2.8.11.2-3138-gdd10872

Stephen Kelly steveire at gmail.com
Mon Jul 15 14:05:51 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  dd108723a889fec7141ccb527be3aff92551a4fb (commit)
       via  2e18259d1622806808d4d6e0372596ed136941a4 (commit)
      from  e167fe7a0bd26631c9588017f50578c101e14b0a (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=dd108723a889fec7141ccb527be3aff92551a4fb
commit dd108723a889fec7141ccb527be3aff92551a4fb
Merge: e167fe7 2e18259
Author:     Stephen Kelly <steveire at gmail.com>
AuthorDate: Mon Jul 15 14:05:49 2013 -0400
Commit:     CMake Topic Stage <kwrobot at kitware.com>
CommitDate: Mon Jul 15 14:05:49 2013 -0400

    Merge topic 'install-interface-includes' into next
    
    2e18259 Export the INCLUDES DESTINATION without appending to the target.

diff --cc Source/cmExportInstallFileGenerator.cxx
index ce7afc5,d01f5b6..c97d4ff
--- 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<cmTarget*>::const_iterator
+   for(std::vector<cmTargetExport*>::const_iterator
          tei = allTargets.begin();
        tei != allTargets.end(); ++tei)
      {
@@@ -124,13 -123,9 +124,13 @@@
  
      ImportPropertyMap properties;
  
-     this->PopulateIncludeDirectoriesInterface(te,
+     this->PopulateIncludeDirectoriesInterface(*tei,
                                    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=2e18259d1622806808d4d6e0372596ed136941a4
commit 2e18259d1622806808d4d6e0372596ed136941a4
Author:     Stephen Kelly <steveire at gmail.com>
AuthorDate: Mon Jul 15 19:42:53 2013 +0200
Commit:     Stephen Kelly <steveire at gmail.com>
CommitDate: Mon Jul 15 20:04:43 2013 +0200

    Export the INCLUDES DESTINATION without appending to the target.

diff --git a/Source/cmExportFileGenerator.cxx b/Source/cmExportFileGenerator.cxx
index 6bef017..8d5e26f 100644
--- a/Source/cmExportFileGenerator.cxx
+++ b/Source/cmExportFileGenerator.cxx
@@ -243,27 +243,31 @@ static bool checkInterfaceDirs(const std::string &prepro,
 
 //----------------------------------------------------------------------------
 void cmExportFileGenerator::PopulateIncludeDirectoriesInterface(
-                      cmTarget *target,
+                      cmTargetExport *tei,
                       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)
+  if (!input && tei->InterfaceIncludeDirectories.empty())
     {
     return;
     }
-  if (!*input)
+  if (!*input && tei->InterfaceIncludeDirectories.empty())
     {
     // Set to empty
     properties[propName] = "";
     return;
     }
 
-  std::string prepro = cmGeneratorExpression::Preprocess(input,
+  std::string includes = (input?input:"");
+  const char* sep = input ? ";" : "";
+  includes += sep + tei->InterfaceIncludeDirectories;
+  std::string prepro = cmGeneratorExpression::Preprocess(includes,
                                                           preprocessRule);
   if (!prepro.empty())
     {
diff --git a/Source/cmExportFileGenerator.h b/Source/cmExportFileGenerator.h
index ed2d93b..3d3d6e1 100644
--- a/Source/cmExportFileGenerator.h
+++ b/Source/cmExportFileGenerator.h
@@ -15,6 +15,8 @@
 #include "cmCommand.h"
 #include "cmGeneratorExpression.h"
 
+class cmTargetExport;
+
 /** \class cmExportFileGenerator
  * \brief Generate a file exporting targets from a build or install tree.
  *
@@ -108,7 +110,7 @@ protected:
   void GenerateInterfaceProperties(cmTarget *target, std::ostream& os,
                                    const ImportPropertyMap &properties);
   void PopulateIncludeDirectoriesInterface(
-                      cmTarget *target,
+                      cmTargetExport *target,
                       cmGeneratorExpression::PreprocessContext preprocessRule,
                       ImportPropertyMap &properties,
                       std::vector<std::string> &missingTargets);
diff --git a/Source/cmExportInstallFileGenerator.cxx b/Source/cmExportInstallFileGenerator.cxx
index a966b16..d01f5b6 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<cmTarget*> allTargets;
+  std::vector<cmTargetExport*> 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 const* te = *tei;
+    cmTargetExport * te = *tei;
     if(this->ExportedTargets.insert(te->Target).second)
       {
-      allTargets.push_back(te->Target);
+      allTargets.push_back(te);
       }
     else
       {
@@ -114,16 +114,16 @@ bool cmExportInstallFileGenerator::GenerateMainFile(std::ostream& os)
   std::vector<std::string> missingTargets;
 
   // Create all the imported targets.
-  for(std::vector<cmTarget*>::const_iterator
+  for(std::vector<cmTargetExport*>::const_iterator
         tei = allTargets.begin();
       tei != allTargets.end(); ++tei)
     {
-    cmTarget* te = *tei;
+    cmTarget* te = (*tei)->Target;
     this->GenerateImportTargetCode(os, te);
 
     ImportPropertyMap properties;
 
-    this->PopulateIncludeDirectoriesInterface(te,
+    this->PopulateIncludeDirectoriesInterface(*tei,
                                   cmGeneratorExpression::InstallInterface,
                                   properties, missingTargets);
     this->PopulateInterfaceProperty("INTERFACE_COMPILE_DEFINITIONS",
diff --git a/Source/cmInstallCommand.cxx b/Source/cmInstallCommand.cxx
index 376b6f1..550d43b 100644
--- a/Source/cmInstallCommand.cxx
+++ b/Source/cmInstallCommand.cxx
@@ -386,21 +386,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);
       }
@@ -765,6 +750,20 @@ 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 c9d87fb..7665888 100644
--- a/Source/cmTargetExport.h
+++ b/Source/cmTargetExport.h
@@ -12,6 +12,8 @@
 #ifndef cmTargetExport_h
 #define cmTargetExport_h
 
+#include "cmStandardIncludes.h"
+
 class cmTarget;
 class cmInstallTargetGenerator;
 class cmInstallFilesGenerator;
@@ -33,6 +35,7 @@ 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, 34 insertions(+), 11 deletions(-)


hooks/post-receive
-- 
CMake


More information about the Cmake-commits mailing list