[Cmake-commits] CMake branch, next, updated. v2.8.10.2-1801-ga7e1dfd

Brad King brad.king at kitware.com
Tue Jan 29 10:57:50 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  a7e1dfd2af37d19dc4b5472c59239186ad9af098 (commit)
       via  5daaa5c48dc6066b5bb145aff30286cc63c12e81 (commit)
      from  12ad6a9bea7a6948724bdb593c0f14619f593a7b (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=a7e1dfd2af37d19dc4b5472c59239186ad9af098
commit a7e1dfd2af37d19dc4b5472c59239186ad9af098
Merge: 12ad6a9 5daaa5c
Author:     Brad King <brad.king at kitware.com>
AuthorDate: Tue Jan 29 10:57:44 2013 -0500
Commit:     CMake Topic Stage <kwrobot at kitware.com>
CommitDate: Tue Jan 29 10:57:44 2013 -0500

    Merge topic 'fix-TARGET_PROPERTY-extraction' into next
    
    5daaa5c Fix TARGET_PROPERTY target extractions.


http://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=5daaa5c48dc6066b5bb145aff30286cc63c12e81
commit 5daaa5c48dc6066b5bb145aff30286cc63c12e81
Author:     Stephen Kelly <steveire at gmail.com>
AuthorDate: Sat Jan 26 11:04:12 2013 +0100
Commit:     Brad King <brad.king at kitware.com>
CommitDate: Tue Jan 29 10:56:09 2013 -0500

    Fix TARGET_PROPERTY target extractions.
    
    We need to make sure we can export targets which have content such
    as $<0:$<TARGET_PROPERTY:not_a_target,INTERFACE_INCLUDE_DIRECTORIES>
    
    That means making not finding a target non-fatal here.

diff --git a/Source/cmExportFileGenerator.cxx b/Source/cmExportFileGenerator.cxx
index 96e0aea..63756b1 100644
--- a/Source/cmExportFileGenerator.cxx
+++ b/Source/cmExportFileGenerator.cxx
@@ -367,7 +367,6 @@ cmExportFileGenerator::ResolveTargetsInGeneratorExpression(
   std::string::size_type lastPos = pos;
 
   cmMakefile *mf = target->GetMakefile();
-  std::string errorString;
 
   while((pos = input.find("$<TARGET_PROPERTY:", lastPos)) != input.npos)
     {
@@ -388,21 +387,14 @@ cmExportFileGenerator::ResolveTargetsInGeneratorExpression(
     std::string targetName = input.substr(nameStartPos,
                                                 commaPos - nameStartPos);
 
-    if (!this->AddTargetNamespace(targetName, target, missingTargets))
+    if (this->AddTargetNamespace(targetName, target, missingTargets))
       {
-      errorString = "$<TARGET_PROPERTY:" + targetName + ",prop> requires "
-                    "its first parameter to be a reachable target.";
-      break;
+      input.replace(nameStartPos, commaPos - nameStartPos, targetName);
       }
-    input.replace(nameStartPos, commaPos - nameStartPos, targetName);
     lastPos = pos + targetName.size();
     }
-  if (!errorString.empty())
-    {
-    mf->IssueMessage(cmake::FATAL_ERROR, errorString);
-    return;
-    }
 
+  std::string errorString;
   pos = 0;
   lastPos = pos;
   while((pos = input.find("$<TARGET_NAME:", lastPos)) != input.npos)
diff --git a/Tests/ExportImport/Export/CMakeLists.txt b/Tests/ExportImport/Export/CMakeLists.txt
index eecfd6a..e3eac51 100644
--- a/Tests/ExportImport/Export/CMakeLists.txt
+++ b/Tests/ExportImport/Export/CMakeLists.txt
@@ -149,6 +149,8 @@ set_property(TARGET testLibRequired APPEND PROPERTY
     $<BUILD_INTERFACE:$<TARGET_PROPERTY:testLibIncludeRequired4,INTERFACE_INCLUDE_DIRECTORIES>>
     $<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:not_a_target>:$<TARGET_PROPERTY:not_a_target,INTERFACE_INCLUDE_DIRECTORIES>>
 )
 
 set_property(TARGET testLibRequired APPEND PROPERTY

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

Summary of changes:


hooks/post-receive
-- 
CMake


More information about the Cmake-commits mailing list