[Cmake-commits] CMake branch, next, updated. v2.8.12-4109-gb8109ab

Brad King brad.king at kitware.com
Thu Oct 17 15:06:21 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  b8109ab36500febe7e1853355322ad4e835cb6c4 (commit)
       via  e315bab75bfa9f687b258ea950a29fd21d6e746f (commit)
      from  7a82747f3461ea4fdd67010342c8b8b16949a2ab (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=b8109ab36500febe7e1853355322ad4e835cb6c4
commit b8109ab36500febe7e1853355322ad4e835cb6c4
Merge: 7a82747 e315bab
Author:     Brad King <brad.king at kitware.com>
AuthorDate: Thu Oct 17 15:06:14 2013 -0400
Commit:     CMake Topic Stage <kwrobot at kitware.com>
CommitDate: Thu Oct 17 15:06:14 2013 -0400

    Merge topic 'INTERFACE-error-with-linked-genex' into next
    
    e315bab Revert "Handle genexes when evaluating INTERFACE_INCLUDE_DIRECTORIES errors."

diff --cc Source/cmPolicies.cxx
index c2bb0e1,6ede28b..5f5cdd8
--- a/Source/cmPolicies.cxx
+++ b/Source/cmPolicies.cxx
@@@ -235,28 -641,24 +235,7 @@@ cmPolicies::cmPolicies(
    this->DefinePolicy(
      CMP0026, "CMP0026",
      "Disallow use of the LOCATION target property.",
 -    "CMake 2.8.12 and lower allowed reading the LOCATION target property to "
 -    "determine the eventual location of build targets.  This relies on the "
 -    "assumption that all necessary information is available at "
 -    "configure-time to determine the final location and filename of the "
 -    "target.  However, this property is not fully determined until later at "
 -    "generate-time.  At generate time, the $<TARGET_FILE> generator "
 -    "expression can be used to determine the eventual LOCATION of a target "
 -    "output."
 -    "\n"
 -    "Code which reads the LOCATION target property can be ported to use the "
 -    "$<TARGET_FILE> generator expression together with the file(GENERATE) "
 -    "subcommand to generate a file containing the target location."
 -    "\n"
 -    "The OLD behavior for this policy is to allow reading the LOCATION "
 -    "property from build-targets.  "
 -    "The NEW behavior for this policy is to not to allow reading the "
 -    "LOCATION property from build-targets.",
      2,8,13,0, cmPolicies::WARN);
- 
-   this->DefinePolicy(
-     CMP0027, "CMP0027",
-     "Conditionally linked imported targets with missing include directories.",
-     "CMake 2.8.11 introduced introduced the concept of "
-     "INTERFACE_INCLUDE_DIRECTORIES, and a check at cmake time that the "
-     "entries in the INTERFACE_INCLUDE_DIRECTORIES of an IMPORTED target "
-     "actually exist.  CMake 2.8.11 also introduced generator expression "
-     "support in the target_link_libraries command.  However, if an imported "
-     "target is linked as a result of a generator expression evaluation, the "
-     "entries in the INTERFACE_INCLUDE_DIRECTORIES of that target were not "
-     "checked for existence as they should be."
-     "\n"
-     "The OLD behavior of this policy is to report a warning if an entry in "
-     "the INTERFACE_INCLUDE_DIRECTORIES of a generator-expression "
-     "conditionally linked IMPORTED target does not exist."
-     "\n"
-     "The NEW behavior of this policy is to report an error if an entry in "
-     "the INTERFACE_INCLUDE_DIRECTORIES of a generator-expression "
-     "conditionally linked IMPORTED target does not exist.",
-     2,8,13,0, cmPolicies::WARN);
  }
  
  cmPolicies::~cmPolicies()

http://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=e315bab75bfa9f687b258ea950a29fd21d6e746f
commit e315bab75bfa9f687b258ea950a29fd21d6e746f
Author:     Brad King <brad.king at kitware.com>
AuthorDate: Thu Oct 17 15:04:34 2013 -0400
Commit:     Brad King <brad.king at kitware.com>
CommitDate: Thu Oct 17 15:04:34 2013 -0400

    Revert "Handle genexes when evaluating INTERFACE_INCLUDE_DIRECTORIES errors."
    
    This reverts commit 5945ee44244b0a09af3e35a1d7018f606f681ff5.
    It will be rebased after policy documentation cleanup.

diff --git a/Source/cmPolicies.cxx b/Source/cmPolicies.cxx
index 3d1cabe..6ede28b 100644
--- a/Source/cmPolicies.cxx
+++ b/Source/cmPolicies.cxx
@@ -659,27 +659,6 @@ cmPolicies::cmPolicies()
     "The NEW behavior for this policy is to not to allow reading the "
     "LOCATION property from build-targets.",
     2,8,13,0, cmPolicies::WARN);
-
-  this->DefinePolicy(
-    CMP0027, "CMP0027",
-    "Conditionally linked imported targets with missing include directories.",
-    "CMake 2.8.11 introduced introduced the concept of "
-    "INTERFACE_INCLUDE_DIRECTORIES, and a check at cmake time that the "
-    "entries in the INTERFACE_INCLUDE_DIRECTORIES of an IMPORTED target "
-    "actually exist.  CMake 2.8.11 also introduced generator expression "
-    "support in the target_link_libraries command.  However, if an imported "
-    "target is linked as a result of a generator expression evaluation, the "
-    "entries in the INTERFACE_INCLUDE_DIRECTORIES of that target were not "
-    "checked for existence as they should be."
-    "\n"
-    "The OLD behavior of this policy is to report a warning if an entry in "
-    "the INTERFACE_INCLUDE_DIRECTORIES of a generator-expression "
-    "conditionally linked IMPORTED target does not exist."
-    "\n"
-    "The NEW behavior of this policy is to report an error if an entry in "
-    "the INTERFACE_INCLUDE_DIRECTORIES of a generator-expression "
-    "conditionally linked IMPORTED target does not exist.",
-    2,8,13,0, cmPolicies::WARN);
 }
 
 cmPolicies::~cmPolicies()
diff --git a/Source/cmPolicies.h b/Source/cmPolicies.h
index a493fee..a9d1b49 100644
--- a/Source/cmPolicies.h
+++ b/Source/cmPolicies.h
@@ -77,8 +77,6 @@ public:
     CMP0024, ///< Disallow including export() result.
     CMP0025, ///< Compiler id for Apple Clang is now AppleClang
     CMP0026, ///< Disallow use of the LOCATION target property.
-    CMP0027, ///< Conditionally linked imported targets with missing include
-    /// directories.
 
     /** \brief Always the last entry.
      *
diff --git a/Source/cmTarget.cxx b/Source/cmTarget.cxx
index b6182ab..5e10e25 100644
--- a/Source/cmTarget.cxx
+++ b/Source/cmTarget.cxx
@@ -1911,56 +1911,19 @@ static void processIncludeDirectories(cmTarget *tgt,
         }
       }
     std::string usedIncludes;
-    cmListFileBacktrace lfbt;
     for(std::vector<std::string>::iterator
           li = entryIncludes.begin(); li != entryIncludes.end(); ++li)
       {
-      std::string targetName = (*it)->TargetName;
-      std::string evaluatedTargetName;
-      {
-      cmGeneratorExpression ge(lfbt);
-      cmsys::auto_ptr<cmCompiledGeneratorExpression> cge =
-                                                        ge.Parse(targetName);
-      evaluatedTargetName = cge->Evaluate(mf, config, false, tgt, 0, 0);
-      }
-
-      cmTarget *dependentTarget = mf->FindTargetToUse(targetName.c_str());
+      cmTarget *dependentTarget =
+                              mf->FindTargetToUse((*it)->TargetName.c_str());
 
       const bool fromImported = dependentTarget
                              && dependentTarget->IsImported();
 
-      cmTarget *evaluatedDependentTarget =
-        (targetName != evaluatedTargetName)
-          ? mf->FindTargetToUse(evaluatedTargetName.c_str())
-          : 0;
-
-      targetName = evaluatedTargetName;
-
-      const bool fromEvaluatedImported = evaluatedDependentTarget
-                             && evaluatedDependentTarget->IsImported();
-
-      if ((fromImported || fromEvaluatedImported)
-          && !cmSystemTools::FileExists(li->c_str()))
+      if (fromImported && !cmSystemTools::FileExists(li->c_str()))
         {
         cmOStringStream e;
-        cmake::MessageType messageType = cmake::FATAL_ERROR;
-        if (fromEvaluatedImported)
-          {
-          switch(mf->GetPolicyStatus(cmPolicies::CMP0027))
-            {
-            case cmPolicies::WARN:
-              e << (mf->GetPolicies()
-                    ->GetPolicyWarning(cmPolicies::CMP0027)) << "\n";
-            case cmPolicies::OLD:
-              messageType = cmake::AUTHOR_WARNING;
-              break;
-            case cmPolicies::REQUIRED_ALWAYS:
-            case cmPolicies::REQUIRED_IF_USED:
-            case cmPolicies::NEW:
-              break;
-            }
-          }
-        e << "Imported target \"" << targetName << "\" includes "
+        e << "Imported target \"" << (*it)->TargetName << "\" includes "
              "non-existent path\n  \"" << *li << "\"\nin its "
              "INTERFACE_INCLUDE_DIRECTORIES. Possible reasons include:\n"
              "* The path was deleted, renamed, or moved to another "
@@ -1969,7 +1932,7 @@ static void processIncludeDirectories(cmTarget *tgt,
              "successfully.\n"
              "* The installation package was faulty and references files it "
              "does not provide.\n";
-        tgt->GetMakefile()->IssueMessage(messageType, e.str().c_str());
+        tgt->GetMakefile()->IssueMessage(cmake::FATAL_ERROR, e.str().c_str());
         return;
         }
 
@@ -1978,9 +1941,9 @@ static void processIncludeDirectories(cmTarget *tgt,
         cmOStringStream e;
         bool noMessage = false;
         cmake::MessageType messageType = cmake::FATAL_ERROR;
-        if (!targetName.empty())
+        if (!(*it)->TargetName.empty())
           {
-          e << "Target \"" << targetName << "\" contains relative "
+          e << "Target \"" << (*it)->TargetName << "\" contains relative "
             "path in its INTERFACE_INCLUDE_DIRECTORIES:\n"
             "  \"" << *li << "\"";
           }
diff --git a/Tests/RunCMake/CMP0027/CMP0027-NEW-result.txt b/Tests/RunCMake/CMP0027/CMP0027-NEW-result.txt
deleted file mode 100644
index d00491f..0000000
--- a/Tests/RunCMake/CMP0027/CMP0027-NEW-result.txt
+++ /dev/null
@@ -1 +0,0 @@
-1
diff --git a/Tests/RunCMake/CMP0027/CMP0027-NEW-stderr.txt b/Tests/RunCMake/CMP0027/CMP0027-NEW-stderr.txt
deleted file mode 100644
index 5948ec8..0000000
--- a/Tests/RunCMake/CMP0027/CMP0027-NEW-stderr.txt
+++ /dev/null
@@ -1,13 +0,0 @@
-CMake Error in CMakeLists.txt:
-  Imported target "testTarget" includes non-existent path
-
-    "/does/not/exist"
-
-  in its INTERFACE_INCLUDE_DIRECTORIES.  Possible reasons include:
-
-  \* The path was deleted, renamed, or moved to another location.
-
-  \* An install or uninstall procedure did not complete successfully.
-
-  \* The installation package was faulty and references files it does not
-  provide.
diff --git a/Tests/RunCMake/CMP0027/CMP0027-NEW.cmake b/Tests/RunCMake/CMP0027/CMP0027-NEW.cmake
deleted file mode 100644
index 8245085..0000000
--- a/Tests/RunCMake/CMP0027/CMP0027-NEW.cmake
+++ /dev/null
@@ -1,10 +0,0 @@
-
-enable_language(CXX)
-
-cmake_policy(SET CMP0027 NEW)
-
-add_library(testTarget UNKNOWN IMPORTED)
-set_property(TARGET testTarget PROPERTY INTERFACE_INCLUDE_DIRECTORIES "/does/not/exist")
-
-add_library(userTarget "${CMAKE_CURRENT_SOURCE_DIR}/empty.cpp")
-target_link_libraries(userTarget PRIVATE $<1:testTarget>)
diff --git a/Tests/RunCMake/CMP0027/CMP0027-OLD-result.txt b/Tests/RunCMake/CMP0027/CMP0027-OLD-result.txt
deleted file mode 100644
index 573541a..0000000
--- a/Tests/RunCMake/CMP0027/CMP0027-OLD-result.txt
+++ /dev/null
@@ -1 +0,0 @@
-0
diff --git a/Tests/RunCMake/CMP0027/CMP0027-OLD-stderr.txt b/Tests/RunCMake/CMP0027/CMP0027-OLD-stderr.txt
deleted file mode 100644
index 4c2b300..0000000
--- a/Tests/RunCMake/CMP0027/CMP0027-OLD-stderr.txt
+++ /dev/null
@@ -1,13 +0,0 @@
-CMake Warning \(dev\) in CMakeLists.txt:
-  Imported target "testTarget" includes non-existent path
-
-    "/does/not/exist"
-
-  in its INTERFACE_INCLUDE_DIRECTORIES.  Possible reasons include:
-
-  \* The path was deleted, renamed, or moved to another location.
-
-  \* An install or uninstall procedure did not complete successfully.
-
-  \* The installation package was faulty and references files it does not
-  provide.
diff --git a/Tests/RunCMake/CMP0027/CMP0027-OLD.cmake b/Tests/RunCMake/CMP0027/CMP0027-OLD.cmake
deleted file mode 100644
index 404217d..0000000
--- a/Tests/RunCMake/CMP0027/CMP0027-OLD.cmake
+++ /dev/null
@@ -1,10 +0,0 @@
-
-enable_language(CXX)
-
-cmake_policy(SET CMP0027 OLD)
-
-add_library(testTarget UNKNOWN IMPORTED)
-set_property(TARGET testTarget PROPERTY INTERFACE_INCLUDE_DIRECTORIES "/does/not/exist")
-
-add_library(userTarget "${CMAKE_CURRENT_SOURCE_DIR}/empty.cpp")
-target_link_libraries(userTarget PRIVATE $<1:testTarget>)
diff --git a/Tests/RunCMake/CMP0027/CMP0027-WARN-result.txt b/Tests/RunCMake/CMP0027/CMP0027-WARN-result.txt
deleted file mode 100644
index 573541a..0000000
--- a/Tests/RunCMake/CMP0027/CMP0027-WARN-result.txt
+++ /dev/null
@@ -1 +0,0 @@
-0
diff --git a/Tests/RunCMake/CMP0027/CMP0027-WARN-stderr.txt b/Tests/RunCMake/CMP0027/CMP0027-WARN-stderr.txt
deleted file mode 100644
index 9bcec3c..0000000
--- a/Tests/RunCMake/CMP0027/CMP0027-WARN-stderr.txt
+++ /dev/null
@@ -1,18 +0,0 @@
-CMake Warning \(dev\) in CMakeLists.txt:
-  Policy CMP0027 is not set: Conditionally linked imported targets with
-  missing include directories.  Run "cmake --help-policy CMP0027" for policy
-  details.  Use the cmake_policy command to set the policy and suppress this
-  warning.
-
-  Imported target "testTarget" includes non-existent path
-
-    "/does/not/exist"
-
-  in its INTERFACE_INCLUDE_DIRECTORIES.  Possible reasons include:
-
-  \* The path was deleted, renamed, or moved to another location.
-
-  \* An install or uninstall procedure did not complete successfully.
-
-  \* The installation package was faulty and references files it does not
-  provide.
diff --git a/Tests/RunCMake/CMP0027/CMP0027-WARN.cmake b/Tests/RunCMake/CMP0027/CMP0027-WARN.cmake
deleted file mode 100644
index 8e5f9b5..0000000
--- a/Tests/RunCMake/CMP0027/CMP0027-WARN.cmake
+++ /dev/null
@@ -1,8 +0,0 @@
-
-enable_language(CXX)
-
-add_library(testTarget UNKNOWN IMPORTED)
-set_property(TARGET testTarget PROPERTY INTERFACE_INCLUDE_DIRECTORIES "/does/not/exist")
-
-add_library(userTarget "${CMAKE_CURRENT_SOURCE_DIR}/empty.cpp")
-target_link_libraries(userTarget PRIVATE $<1:testTarget>)
diff --git a/Tests/RunCMake/CMP0027/CMakeLists.txt b/Tests/RunCMake/CMP0027/CMakeLists.txt
deleted file mode 100644
index 8f85fbf..0000000
--- a/Tests/RunCMake/CMP0027/CMakeLists.txt
+++ /dev/null
@@ -1,3 +0,0 @@
-cmake_minimum_required(VERSION 2.8.4)
-project(${RunCMake_TEST} NONE)
-include(${RunCMake_TEST}.cmake NO_POLICY_SCOPE)
diff --git a/Tests/RunCMake/CMP0027/RunCMakeTest.cmake b/Tests/RunCMake/CMP0027/RunCMakeTest.cmake
deleted file mode 100644
index 1017f01..0000000
--- a/Tests/RunCMake/CMP0027/RunCMakeTest.cmake
+++ /dev/null
@@ -1,5 +0,0 @@
-include(RunCMake)
-
-run_cmake(CMP0027-NEW)
-run_cmake(CMP0027-OLD)
-run_cmake(CMP0027-WARN)
diff --git a/Tests/RunCMake/CMP0027/empty.cpp b/Tests/RunCMake/CMP0027/empty.cpp
deleted file mode 100644
index e69de29..0000000
diff --git a/Tests/RunCMake/CMakeLists.txt b/Tests/RunCMake/CMakeLists.txt
index 52c8667..6d5b07b 100644
--- a/Tests/RunCMake/CMakeLists.txt
+++ b/Tests/RunCMake/CMakeLists.txt
@@ -54,7 +54,6 @@ endif()
 add_RunCMake_test(CMP0019)
 add_RunCMake_test(CMP0022)
 add_RunCMake_test(CMP0026)
-add_RunCMake_test(CMP0027)
 add_RunCMake_test(CTest)
 if(UNIX AND "${CMAKE_TEST_GENERATOR}" MATCHES "Unix Makefiles")
   add_RunCMake_test(CompilerChange)

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

Summary of changes:
 Source/cmPolicies.cxx                          |   21 ----------
 Source/cmPolicies.h                            |    2 -
 Source/cmTarget.cxx                            |   51 +++--------------------
 Tests/RunCMake/CMP0027/CMP0027-NEW-result.txt  |    1 -
 Tests/RunCMake/CMP0027/CMP0027-NEW-stderr.txt  |   13 ------
 Tests/RunCMake/CMP0027/CMP0027-NEW.cmake       |   10 -----
 Tests/RunCMake/CMP0027/CMP0027-OLD-result.txt  |    1 -
 Tests/RunCMake/CMP0027/CMP0027-OLD-stderr.txt  |   13 ------
 Tests/RunCMake/CMP0027/CMP0027-OLD.cmake       |   10 -----
 Tests/RunCMake/CMP0027/CMP0027-WARN-result.txt |    1 -
 Tests/RunCMake/CMP0027/CMP0027-WARN-stderr.txt |   18 --------
 Tests/RunCMake/CMP0027/CMP0027-WARN.cmake      |    8 ----
 Tests/RunCMake/CMP0027/CMakeLists.txt          |    3 -
 Tests/RunCMake/CMP0027/RunCMakeTest.cmake      |    5 --
 Tests/RunCMake/CMakeLists.txt                  |    1 -
 15 files changed, 7 insertions(+), 151 deletions(-)
 delete mode 100644 Tests/RunCMake/CMP0027/CMP0027-NEW-result.txt
 delete mode 100644 Tests/RunCMake/CMP0027/CMP0027-NEW-stderr.txt
 delete mode 100644 Tests/RunCMake/CMP0027/CMP0027-NEW.cmake
 delete mode 100644 Tests/RunCMake/CMP0027/CMP0027-OLD-result.txt
 delete mode 100644 Tests/RunCMake/CMP0027/CMP0027-OLD-stderr.txt
 delete mode 100644 Tests/RunCMake/CMP0027/CMP0027-OLD.cmake
 delete mode 100644 Tests/RunCMake/CMP0027/CMP0027-WARN-result.txt
 delete mode 100644 Tests/RunCMake/CMP0027/CMP0027-WARN-stderr.txt
 delete mode 100644 Tests/RunCMake/CMP0027/CMP0027-WARN.cmake
 delete mode 100644 Tests/RunCMake/CMP0027/CMakeLists.txt
 delete mode 100644 Tests/RunCMake/CMP0027/RunCMakeTest.cmake
 delete mode 100644 Tests/RunCMake/CMP0027/empty.cpp


hooks/post-receive
-- 
CMake


More information about the Cmake-commits mailing list