فهرست منبع

Merge topic 'install-subdirectory-order'

b56f2db87a Testing: Add test for CMP0082
fc8955e889 add_subdirectory: Run subdirectory install rules in correct order
514f0b572e Testing: Update hard-coded line numbers to [0-9]+ in some tests

Acked-by: Kitware Robot <[email protected]>
Merge-request: !2434
Brad King 7 سال پیش
والد
کامیت
7d2ee4cb98
100فایلهای تغییر یافته به همراه446 افزوده شده و 114 حذف شده
  1. 8 0
      Help/manual/cmake-policies.7.rst
  2. 24 0
      Help/policy/CMP0082.rst
  3. 5 0
      Help/release/dev/install-subdirectory-order.rst
  4. 2 0
      Help/variable/CMAKE_POLICY_WARNING_CMPNNNN.rst
  5. 2 0
      Source/CMakeLists.txt
  6. 13 0
      Source/cmInstallGenerator.cxx
  7. 4 0
      Source/cmInstallGenerator.h
  8. 2 2
      Source/cmInstallScriptGenerator.cxx
  9. 77 0
      Source/cmInstallSubdirectoryGenerator.cxx
  10. 41 0
      Source/cmInstallSubdirectoryGenerator.h
  11. 47 16
      Source/cmLocalGenerator.cxx
  12. 4 0
      Source/cmMakefile.cxx
  13. 5 1
      Source/cmPolicies.h
  14. 1 1
      Tests/RunCMake/CMP0026/CMP0026-CONFIG-LOCATION-NEW-stderr.txt
  15. 1 1
      Tests/RunCMake/CMP0026/CMP0026-CONFIG-LOCATION-OLD-stderr.txt
  16. 1 1
      Tests/RunCMake/CMP0026/CMP0026-CONFIG-LOCATION-WARN-stderr.txt
  17. 1 1
      Tests/RunCMake/CMP0026/CMP0026-LOCATION-CONFIG-NEW-stderr.txt
  18. 1 1
      Tests/RunCMake/CMP0026/CMP0026-LOCATION-CONFIG-OLD-stderr.txt
  19. 1 1
      Tests/RunCMake/CMP0026/CMP0026-LOCATION-CONFIG-WARN-stderr.txt
  20. 1 1
      Tests/RunCMake/CMP0026/CMP0026-NEW-stderr.txt
  21. 1 1
      Tests/RunCMake/CMP0026/CMP0026-OLD-stderr.txt
  22. 2 2
      Tests/RunCMake/CMP0026/CMP0026-WARN-stderr.txt
  23. 1 1
      Tests/RunCMake/CMP0026/LOCATION-and-TARGET_OBJECTS-stderr.txt
  24. 1 1
      Tests/RunCMake/CMP0026/ObjlibNotDefined-stderr.txt
  25. 1 1
      Tests/RunCMake/CMP0026/clear-cached-information-stderr.txt
  26. 1 1
      Tests/RunCMake/CMP0051/CMP0051-OLD-stderr.txt
  27. 2 2
      Tests/RunCMake/CMP0051/CMP0051-WARN-stderr.txt
  28. 1 1
      Tests/RunCMake/CommandLine/Wdeprecated-stderr.txt
  29. 2 2
      Tests/RunCMake/CommandLine/Wdev-stderr.txt
  30. 1 1
      Tests/RunCMake/CommandLine/Werror_deprecated-stderr.txt
  31. 2 2
      Tests/RunCMake/CommandLine/Werror_dev-stderr.txt
  32. 1 1
      Tests/RunCMake/CommandLine/Wno-error_deprecated-stderr.txt
  33. 2 2
      Tests/RunCMake/CommandLine/Wno-error_dev-stderr.txt
  34. 2 2
      Tests/RunCMake/ExternalData/BadAlgoMap1-stderr.txt
  35. 2 2
      Tests/RunCMake/ExternalData/BadAlgoMap2-stderr.txt
  36. 2 2
      Tests/RunCMake/ExternalData/BadHashAlgo1-stderr.txt
  37. 2 2
      Tests/RunCMake/ExternalData/BadOption1-stderr.txt
  38. 2 2
      Tests/RunCMake/ExternalData/BadOption2-stderr.txt
  39. 2 2
      Tests/RunCMake/ExternalData/BadRecurse1-stderr.txt
  40. 2 2
      Tests/RunCMake/ExternalData/BadRecurse2-stderr.txt
  41. 2 2
      Tests/RunCMake/ExternalData/BadRecurse3-stderr.txt
  42. 2 2
      Tests/RunCMake/ExternalData/BadSeries1-stderr.txt
  43. 2 2
      Tests/RunCMake/ExternalData/BadSeries2-stderr.txt
  44. 2 2
      Tests/RunCMake/ExternalData/BadSeries3-stderr.txt
  45. 2 2
      Tests/RunCMake/ExternalData/Directory1-stderr.txt
  46. 2 2
      Tests/RunCMake/ExternalData/Directory2-stderr.txt
  47. 2 2
      Tests/RunCMake/ExternalData/Directory3-stderr.txt
  48. 2 2
      Tests/RunCMake/ExternalData/Directory4-stderr.txt
  49. 2 2
      Tests/RunCMake/ExternalData/Directory5-stderr.txt
  50. 2 2
      Tests/RunCMake/ExternalData/MissingData-stderr.txt
  51. 2 2
      Tests/RunCMake/ExternalData/MissingDataWithAssociated-stderr.txt
  52. 2 2
      Tests/RunCMake/ExternalData/NoLinkInSource-stderr.txt
  53. 2 2
      Tests/RunCMake/ExternalData/NoURLTemplates-stderr.txt
  54. 8 8
      Tests/RunCMake/TargetPropertyGeneratorExpressions/BadInvalidName-stderr.txt
  55. 1 1
      Tests/RunCMake/TargetPropertyGeneratorExpressions/BadNonTarget-stderr.txt
  56. 1 1
      Tests/RunCMake/TargetPropertyGeneratorExpressions/LinkImplementationCycle1-stderr.txt
  57. 1 1
      Tests/RunCMake/TargetPropertyGeneratorExpressions/LinkImplementationCycle2-stderr.txt
  58. 2 2
      Tests/RunCMake/TargetSources/CMP0076-WARN-stderr.txt
  59. 4 4
      Tests/RunCMake/TargetSources/OriginDebug-stderr.txt
  60. 1 0
      Tests/RunCMake/add_subdirectory/CMP0082-ExcludeFromAll/CMakeLists.txt
  61. 4 0
      Tests/RunCMake/add_subdirectory/CMP0082-NEW-install-component-stdout.txt
  62. 3 0
      Tests/RunCMake/add_subdirectory/CMP0082-NEW-install-stdout.txt
  63. 3 0
      Tests/RunCMake/add_subdirectory/CMP0082-NEW.cmake
  64. 1 0
      Tests/RunCMake/add_subdirectory/CMP0082-Nested/CMakeLists.txt
  65. 1 0
      Tests/RunCMake/add_subdirectory/CMP0082-Nested/sub/CMakeLists.txt
  66. 2 0
      Tests/RunCMake/add_subdirectory/CMP0082-NestedSub/CMakeLists.txt
  67. 1 0
      Tests/RunCMake/add_subdirectory/CMP0082-NestedSub/sub/CMakeLists.txt
  68. 0 0
      Tests/RunCMake/add_subdirectory/CMP0082-None/CMakeLists.txt
  69. 4 0
      Tests/RunCMake/add_subdirectory/CMP0082-OLD-install-component-stdout.txt
  70. 3 0
      Tests/RunCMake/add_subdirectory/CMP0082-OLD-install-stdout.txt
  71. 3 0
      Tests/RunCMake/add_subdirectory/CMP0082-OLD.cmake
  72. 4 0
      Tests/RunCMake/add_subdirectory/CMP0082-WARN-Nested-install-component-stdout.txt
  73. 3 0
      Tests/RunCMake/add_subdirectory/CMP0082-WARN-Nested-install-stdout.txt
  74. 7 0
      Tests/RunCMake/add_subdirectory/CMP0082-WARN-Nested-stderr.txt
  75. 2 0
      Tests/RunCMake/add_subdirectory/CMP0082-WARN-Nested.cmake
  76. 4 0
      Tests/RunCMake/add_subdirectory/CMP0082-WARN-NestedSub-install-component-stdout.txt
  77. 3 0
      Tests/RunCMake/add_subdirectory/CMP0082-WARN-NestedSub-install-stdout.txt
  78. 7 0
      Tests/RunCMake/add_subdirectory/CMP0082-WARN-NestedSub-stderr.txt
  79. 1 0
      Tests/RunCMake/add_subdirectory/CMP0082-WARN-NestedSub.cmake
  80. 3 0
      Tests/RunCMake/add_subdirectory/CMP0082-WARN-NoTopInstall-install-component-stdout.txt
  81. 2 0
      Tests/RunCMake/add_subdirectory/CMP0082-WARN-NoTopInstall-install-stdout.txt
  82. 1 0
      Tests/RunCMake/add_subdirectory/CMP0082-WARN-NoTopInstall.cmake
  83. 3 0
      Tests/RunCMake/add_subdirectory/CMP0082-WARN-None-install-component-stdout.txt
  84. 2 0
      Tests/RunCMake/add_subdirectory/CMP0082-WARN-None-install-stdout.txt
  85. 2 0
      Tests/RunCMake/add_subdirectory/CMP0082-WARN-None.cmake
  86. 4 0
      Tests/RunCMake/add_subdirectory/CMP0082-WARN-install-component-stdout.txt
  87. 3 0
      Tests/RunCMake/add_subdirectory/CMP0082-WARN-install-stdout.txt
  88. 7 0
      Tests/RunCMake/add_subdirectory/CMP0082-WARN-stderr.txt
  89. 3 0
      Tests/RunCMake/add_subdirectory/CMP0082-WARN.cmake
  90. 1 0
      Tests/RunCMake/add_subdirectory/CMP0082/CMakeLists.txt
  91. 7 0
      Tests/RunCMake/add_subdirectory/CMakeLists.txt
  92. 1 1
      Tests/RunCMake/add_subdirectory/DoesNotExist-stderr.txt
  93. 1 1
      Tests/RunCMake/add_subdirectory/Missing-stderr.txt
  94. 22 0
      Tests/RunCMake/add_subdirectory/RunCMakeTest.cmake
  95. 1 1
      Tests/RunCMake/file/FileOpenFailRead-stderr.txt
  96. 6 6
      Tests/RunCMake/file/INSTALL-MESSAGE-bad-stderr.txt
  97. 1 1
      Tests/RunCMake/get_property/BadArgument-stderr.txt
  98. 1 1
      Tests/RunCMake/get_property/BadDirectory-stderr.txt
  99. 1 1
      Tests/RunCMake/get_property/BadScope-stderr.txt
  100. 1 1
      Tests/RunCMake/get_property/BadTarget-stderr.txt

+ 8 - 0
Help/manual/cmake-policies.7.rst

@@ -51,6 +51,14 @@ The :variable:`CMAKE_MINIMUM_REQUIRED_VERSION` variable may also be used
 to determine whether to report an error on use of deprecated macros or
 functions.
 
+Policies Introduced by CMake 3.14
+=================================
+
+.. toctree::
+   :maxdepth: 1
+
+   CMP0082: Install rules from add_subdirectory() are interleaved with those in caller. </policy/CMP0082>
+
 Policies Introduced by CMake 3.13
 =================================
 

+ 24 - 0
Help/policy/CMP0082.rst

@@ -0,0 +1,24 @@
+CMP0082
+-------
+
+Install rules from :command:`add_subdirectory` calls are interleaved with
+those in caller.
+
+CMake 3.13 and lower ran the install rules from :command:`add_subdirectory`
+after all other install rules, even if :command:`add_subdirectory` was called
+before the other install rules.  CMake 3.14 and later interleaves these
+:command:`add_subdirectory` install rules with the others so that they are
+run in the order they are declared.
+
+The ``OLD`` behavior for this policy is to run the install rules from
+:command:`add_subdirectory` after the other install rules.  The ``NEW``
+behavior for this policy is to run all install rules in the order they are
+declared.
+
+This policy was introduced in CMake version 3.14.  Unlike most policies,
+CMake version |release| does *not* warn by default when this policy
+is not set and simply uses OLD behavior.  See documentation of the
+:variable:`CMAKE_POLICY_WARNING_CMP0082 <CMAKE_POLICY_WARNING_CMP<NNNN>>`
+variable to control the warning.
+
+.. include:: DEPRECATED.txt

+ 5 - 0
Help/release/dev/install-subdirectory-order.rst

@@ -0,0 +1,5 @@
+install-subdirectory-order
+--------------------------
+
+* Install rules under :command:`add_subdirectory` now interleave with those in
+  the calling directory. See policy :policy:`CMP0082` for details.

+ 2 - 0
Help/variable/CMAKE_POLICY_WARNING_CMPNNNN.rst

@@ -19,6 +19,8 @@ warn by default:
   policy :policy:`CMP0066`.
 * ``CMAKE_POLICY_WARNING_CMP0067`` controls the warning for
   policy :policy:`CMP0067`.
+* ``CMAKE_POLICY_WARNING_CMP0082`` controls the warning for
+  policy :policy:`CMP0082`.
 
 This variable should not be set by a project in CMake code.  Project
 developers running CMake may set this variable in their cache to

+ 2 - 0
Source/CMakeLists.txt

@@ -260,6 +260,8 @@ set(SRCS
   cmInstallFilesGenerator.cxx
   cmInstallScriptGenerator.h
   cmInstallScriptGenerator.cxx
+  cmInstallSubdirectoryGenerator.h
+  cmInstallSubdirectoryGenerator.cxx
   cmInstallTargetGenerator.h
   cmInstallTargetGenerator.cxx
   cmInstallDirectoryGenerator.h

+ 13 - 0
Source/cmInstallGenerator.cxx

@@ -22,6 +22,19 @@ cmInstallGenerator::~cmInstallGenerator()
 {
 }
 
+bool cmInstallGenerator::HaveInstall()
+{
+  return true;
+}
+
+void cmInstallGenerator::CheckCMP0082(bool& haveSubdirectoryInstall,
+                                      bool& haveInstallAfterSubdirectory)
+{
+  if (haveSubdirectoryInstall) {
+    haveInstallAfterSubdirectory = true;
+  }
+}
+
 void cmInstallGenerator::AddInstallRule(
   std::ostream& os, std::string const& dest, cmInstallType type,
   std::vector<std::string> const& files, bool optional /* = false */,

+ 4 - 0
Source/cmInstallGenerator.h

@@ -38,6 +38,10 @@ public:
                      bool exclude_from_all);
   ~cmInstallGenerator() override;
 
+  virtual bool HaveInstall();
+  virtual void CheckCMP0082(bool& haveSubdirectoryInstall,
+                            bool& haveInstallAfterSubdirectory);
+
   void AddInstallRule(
     std::ostream& os, std::string const& dest, cmInstallType type,
     std::vector<std::string> const& files, bool optional = false,

+ 2 - 2
Source/cmInstallScriptGenerator.cxx

@@ -37,9 +37,9 @@ void cmInstallScriptGenerator::AddScriptInstallRule(std::ostream& os,
                                                     std::string const& script)
 {
   if (this->Code) {
-    os << indent.Next() << script << "\n";
+    os << indent << script << "\n";
   } else {
-    os << indent.Next() << "include(\"" << script << "\")\n";
+    os << indent << "include(\"" << script << "\")\n";
   }
 }
 

+ 77 - 0
Source/cmInstallSubdirectoryGenerator.cxx

@@ -0,0 +1,77 @@
+/* Distributed under the OSI-approved BSD 3-Clause License.  See accompanying
+   file Copyright.txt or https://cmake.org/licensing for details.  */
+#include "cmInstallSubdirectoryGenerator.h"
+
+#include "cmLocalGenerator.h"
+#include "cmMakefile.h"
+#include "cmPolicies.h"
+#include "cmScriptGenerator.h"
+#include "cmSystemTools.h"
+
+#include <sstream>
+#include <vector>
+
+cmInstallSubdirectoryGenerator::cmInstallSubdirectoryGenerator(
+  cmMakefile* makefile, const char* binaryDirectory, bool excludeFromAll)
+  : cmInstallGenerator(nullptr, std::vector<std::string>(), nullptr,
+                       MessageDefault, excludeFromAll)
+  , Makefile(makefile)
+  , BinaryDirectory(binaryDirectory)
+{
+}
+
+cmInstallSubdirectoryGenerator::~cmInstallSubdirectoryGenerator()
+{
+}
+
+bool cmInstallSubdirectoryGenerator::HaveInstall()
+{
+  for (auto generator : this->Makefile->GetInstallGenerators()) {
+    if (generator->HaveInstall()) {
+      return true;
+    }
+  }
+
+  return false;
+}
+
+void cmInstallSubdirectoryGenerator::CheckCMP0082(
+  bool& haveSubdirectoryInstall, bool& /*unused*/)
+{
+  if (this->HaveInstall()) {
+    haveSubdirectoryInstall = true;
+  }
+}
+
+void cmInstallSubdirectoryGenerator::Compute(cmLocalGenerator* lg)
+{
+  this->LocalGenerator = lg;
+}
+
+void cmInstallSubdirectoryGenerator::GenerateScript(std::ostream& os)
+{
+  if (!this->ExcludeFromAll) {
+    cmPolicies::PolicyStatus status =
+      this->LocalGenerator->GetPolicyStatus(cmPolicies::CMP0082);
+    switch (status) {
+      case cmPolicies::WARN:
+      case cmPolicies::OLD:
+        // OLD behavior is handled in cmLocalGenerator::GenerateInstallRules()
+        break;
+
+      case cmPolicies::NEW:
+      case cmPolicies::REQUIRED_IF_USED:
+      case cmPolicies::REQUIRED_ALWAYS: {
+        Indent indent;
+        std::string odir = this->BinaryDirectory;
+        cmSystemTools::ConvertToUnixSlashes(odir);
+        os << indent << "if(NOT CMAKE_INSTALL_LOCAL_ONLY)\n"
+           << indent.Next()
+           << "# Include the install script for the subdirectory.\n"
+           << indent.Next() << "include(\"" << odir
+           << "/cmake_install.cmake\")\n"
+           << indent << "endif()\n\n";
+      } break;
+    }
+  }
+}

+ 41 - 0
Source/cmInstallSubdirectoryGenerator.h

@@ -0,0 +1,41 @@
+/* Distributed under the OSI-approved BSD 3-Clause License.  See accompanying
+   file Copyright.txt or https://cmake.org/licensing for details.  */
+#ifndef cmInstallSubdirectoryGenerator_h
+#define cmInstallSubdirectoryGenerator_h
+
+#include "cmConfigure.h" // IWYU pragma: keep
+
+#include "cmInstallGenerator.h"
+
+#include <iosfwd>
+#include <string>
+
+class cmLocalGenerator;
+class cmMakefile;
+
+/** \class cmInstallSubdirectoryGenerator
+ * \brief Generate target installation rules.
+ */
+class cmInstallSubdirectoryGenerator : public cmInstallGenerator
+{
+public:
+  cmInstallSubdirectoryGenerator(cmMakefile* makefile,
+                                 const char* binaryDirectory,
+                                 bool excludeFromAll);
+  ~cmInstallSubdirectoryGenerator() override;
+
+  bool HaveInstall() override;
+  void CheckCMP0082(bool& haveSubdirectoryInstall,
+                    bool& haveInstallAfterSubdirectory) override;
+
+  void Compute(cmLocalGenerator* lg) override;
+
+protected:
+  void GenerateScript(std::ostream& os) override;
+
+  cmMakefile* Makefile;
+  std::string BinaryDirectory;
+  cmLocalGenerator* LocalGenerator;
+};
+
+#endif

+ 47 - 16
Source/cmLocalGenerator.cxx

@@ -517,31 +517,62 @@ void cmLocalGenerator::GenerateInstallRules()
   }
 
   // Ask each install generator to write its code.
+  cmPolicies::PolicyStatus status = this->GetPolicyStatus(cmPolicies::CMP0082);
   std::vector<cmInstallGenerator*> const& installers =
     this->Makefile->GetInstallGenerators();
-  for (cmInstallGenerator* installer : installers) {
-    installer->Generate(fout, config, configurationTypes);
+  bool haveSubdirectoryInstall = false;
+  bool haveInstallAfterSubdirectory = false;
+  if (status == cmPolicies::WARN) {
+    for (cmInstallGenerator* installer : installers) {
+      installer->CheckCMP0082(haveSubdirectoryInstall,
+                              haveInstallAfterSubdirectory);
+      installer->Generate(fout, config, configurationTypes);
+    }
+  } else {
+    for (cmInstallGenerator* installer : installers) {
+      installer->Generate(fout, config, configurationTypes);
+    }
   }
 
   // Write rules from old-style specification stored in targets.
   this->GenerateTargetInstallRules(fout, config, configurationTypes);
 
   // Include install scripts from subdirectories.
-  std::vector<cmStateSnapshot> children =
-    this->Makefile->GetStateSnapshot().GetChildren();
-  if (!children.empty()) {
-    fout << "if(NOT CMAKE_INSTALL_LOCAL_ONLY)\n";
-    fout << "  # Include the install script for each subdirectory.\n";
-    for (cmStateSnapshot const& c : children) {
-      if (!c.GetDirectory().GetPropertyAsBool("EXCLUDE_FROM_ALL")) {
-        std::string odir = c.GetDirectory().GetCurrentBinary();
-        cmSystemTools::ConvertToUnixSlashes(odir);
-        fout << "  include(\"" << odir << "/cmake_install.cmake\")"
-             << std::endl;
+  switch (status) {
+    case cmPolicies::WARN:
+      if (haveInstallAfterSubdirectory &&
+          this->Makefile->PolicyOptionalWarningEnabled(
+            "CMAKE_POLICY_WARNING_CMP0082")) {
+        std::ostringstream e;
+        e << cmPolicies::GetPolicyWarning(cmPolicies::CMP0082) << "\n";
+        this->IssueMessage(cmake::AUTHOR_WARNING, e.str());
       }
-    }
-    fout << "\n";
-    fout << "endif()\n\n";
+      CM_FALLTHROUGH;
+    case cmPolicies::OLD: {
+      std::vector<cmStateSnapshot> children =
+        this->Makefile->GetStateSnapshot().GetChildren();
+      if (!children.empty()) {
+        fout << "if(NOT CMAKE_INSTALL_LOCAL_ONLY)\n";
+        fout << "  # Include the install script for each subdirectory.\n";
+        for (cmStateSnapshot const& c : children) {
+          if (!c.GetDirectory().GetPropertyAsBool("EXCLUDE_FROM_ALL")) {
+            std::string odir = c.GetDirectory().GetCurrentBinary();
+            cmSystemTools::ConvertToUnixSlashes(odir);
+            fout << "  include(\"" << odir << "/cmake_install.cmake\")"
+                 << std::endl;
+          }
+        }
+        fout << "\n";
+        fout << "endif()\n\n";
+      }
+    } break;
+
+    case cmPolicies::REQUIRED_IF_USED:
+    case cmPolicies::REQUIRED_ALWAYS:
+    case cmPolicies::NEW:
+      // NEW behavior is handled in
+      // cmInstallSubdirectoryGenerator::GenerateScript()
+      break;
   }
 
   // Record the install manifest.

+ 4 - 0
Source/cmMakefile.cxx

@@ -28,6 +28,7 @@
 #include "cmGeneratorExpressionEvaluationFile.h"
 #include "cmGlobalGenerator.h"
 #include "cmInstallGenerator.h" // IWYU pragma: keep
+#include "cmInstallSubdirectoryGenerator.h"
 #include "cmListFileCache.h"
 #include "cmSourceFile.h"
 #include "cmSourceFileLocation.h"
@@ -1669,6 +1670,9 @@ void cmMakefile::AddSubDirectory(const std::string& srcPath,
   } else {
     this->UnConfiguredDirectories.push_back(subMf);
   }
+
+  this->AddInstallGenerator(new cmInstallSubdirectoryGenerator(
+    subMf, binPath.c_str(), excludeFromAll));
 }
 
 const std::string& cmMakefile::GetCurrentSourceDirectory() const

+ 5 - 1
Source/cmPolicies.h

@@ -240,7 +240,11 @@ class cmMakefile;
          cmPolicies::WARN)                                                    \
   SELECT(POLICY, CMP0081,                                                     \
          "Relative paths not allowed in LINK_DIRECTORIES target property.",   \
-         3, 13, 0, cmPolicies::WARN)
+         3, 13, 0, cmPolicies::WARN)                                          \
+  SELECT(POLICY, CMP0082,                                                     \
+         "Install rules from add_subdirectory() are interleaved with those "  \
+         "in caller.",                                                        \
+         3, 14, 0, cmPolicies::WARN)
 
 #define CM_SELECT_ID(F, A1, A2, A3, A4, A5, A6) F(A1)
 #define CM_FOR_EACH_POLICY_ID(POLICY)                                         \

+ 1 - 1
Tests/RunCMake/CMP0026/CMP0026-CONFIG-LOCATION-NEW-stderr.txt

@@ -4,4 +4,4 @@ CMake Error at CMP0026-CONFIG-LOCATION-NEW.cmake:7 \(get_target_property\):
   expression \$<TARGET_FILE>, as appropriate.
 
 Call Stack \(most recent call first\):
-  CMakeLists.txt:3 \(include\)
+  CMakeLists\.txt:[0-9]+ \(include\)

+ 1 - 1
Tests/RunCMake/CMP0026/CMP0026-CONFIG-LOCATION-OLD-stderr.txt

@@ -7,4 +7,4 @@
   specific short-term circumstances.  Projects should be ported to the NEW
   behavior and not rely on setting a policy to OLD.
 Call Stack \(most recent call first\):
-  CMakeLists.txt:[0-9]+ \(include\)$
+  CMakeLists\.txt:[0-9]+ \(include\)$

+ 1 - 1
Tests/RunCMake/CMP0026/CMP0026-CONFIG-LOCATION-WARN-stderr.txt

@@ -8,5 +8,5 @@ CMake Warning \(dev\) at CMP0026-CONFIG-LOCATION-WARN.cmake:5 \(get_target_prope
   expression \$<TARGET_FILE>, as appropriate.
 
 Call Stack \(most recent call first\):
-  CMakeLists.txt:3 \(include\)
+  CMakeLists\.txt:[0-9]+ \(include\)
 This warning is for project developers.  Use -Wno-dev to suppress it.

+ 1 - 1
Tests/RunCMake/CMP0026/CMP0026-LOCATION-CONFIG-NEW-stderr.txt

@@ -4,4 +4,4 @@ CMake Error at CMP0026-LOCATION-CONFIG-NEW.cmake:7 \(get_target_property\):
   expression \$<TARGET_FILE>, as appropriate.
 
 Call Stack \(most recent call first\):
-  CMakeLists.txt:3 \(include\)
+  CMakeLists\.txt:[0-9]+ \(include\)

+ 1 - 1
Tests/RunCMake/CMP0026/CMP0026-LOCATION-CONFIG-OLD-stderr.txt

@@ -7,4 +7,4 @@
   specific short-term circumstances.  Projects should be ported to the NEW
   behavior and not rely on setting a policy to OLD.
 Call Stack \(most recent call first\):
-  CMakeLists.txt:[0-9]+ \(include\)$
+  CMakeLists\.txt:[0-9]+ \(include\)$

+ 1 - 1
Tests/RunCMake/CMP0026/CMP0026-LOCATION-CONFIG-WARN-stderr.txt

@@ -8,5 +8,5 @@ CMake Warning \(dev\) at CMP0026-LOCATION-CONFIG-WARN.cmake:5 \(get_target_prope
   expression \$<TARGET_FILE>, as appropriate.
 
 Call Stack \(most recent call first\):
-  CMakeLists.txt:3 \(include\)
+  CMakeLists\.txt:[0-9]+ \(include\)
 This warning is for project developers.  Use -Wno-dev to suppress it.

+ 1 - 1
Tests/RunCMake/CMP0026/CMP0026-NEW-stderr.txt

@@ -4,4 +4,4 @@ CMake Error at CMP0026-NEW.cmake:7 \(get_target_property\):
   expression \$<TARGET_FILE>, as appropriate.
 
 Call Stack \(most recent call first\):
-  CMakeLists.txt:3 \(include\)
+  CMakeLists\.txt:[0-9]+ \(include\)

+ 1 - 1
Tests/RunCMake/CMP0026/CMP0026-OLD-stderr.txt

@@ -7,4 +7,4 @@
   specific short-term circumstances.  Projects should be ported to the NEW
   behavior and not rely on setting a policy to OLD.
 Call Stack \(most recent call first\):
-  CMakeLists.txt:[0-9]+ \(include\)$
+  CMakeLists\.txt:[0-9]+ \(include\)$

+ 2 - 2
Tests/RunCMake/CMP0026/CMP0026-WARN-stderr.txt

@@ -8,7 +8,7 @@ CMake Warning \(dev\) at CMP0026-WARN.cmake:5 \(get_target_property\):
   expression \$<TARGET_FILE>, as appropriate.
 
 Call Stack \(most recent call first\):
-  CMakeLists.txt:3 \(include\)
+  CMakeLists\.txt:[0-9]+ \(include\)
 This warning is for project developers.  Use -Wno-dev to suppress it.
 +
 CMake Warning \(dev\) at CMP0026-WARN.cmake:8 \(get_target_property\):
@@ -21,5 +21,5 @@ CMake Warning \(dev\) at CMP0026-WARN.cmake:8 \(get_target_property\):
   expression \$<TARGET_FILE>, as appropriate.
 
 Call Stack \(most recent call first\):
-  CMakeLists.txt:3 \(include\)
+  CMakeLists\.txt:[0-9]+ \(include\)
 This warning is for project developers.  Use -Wno-dev to suppress it.

+ 1 - 1
Tests/RunCMake/CMP0026/LOCATION-and-TARGET_OBJECTS-stderr.txt

@@ -8,5 +8,5 @@ CMake Warning \(dev\) at LOCATION-and-TARGET_OBJECTS.cmake:[0-9]+ \(get_target_p
   \$<TARGET_FILE>, as appropriate.
 
 Call Stack \(most recent call first\):
-  CMakeLists.txt:[0-9]+ \(include\)
+  CMakeLists\.txt:[0-9]+ \(include\)
 This warning is for project developers.  Use -Wno-dev to suppress it.

+ 1 - 1
Tests/RunCMake/CMP0026/ObjlibNotDefined-stderr.txt

@@ -8,5 +8,5 @@ CMake Warning \(dev\) at ObjlibNotDefined.cmake:[0-9]+ \(get_target_property\):
   expression \$<TARGET_FILE>, as appropriate.
 
 Call Stack \(most recent call first\):
-  CMakeLists.txt:3 \(include\)
+  CMakeLists\.txt:[0-9]+ \(include\)
 This warning is for project developers.  Use -Wno-dev to suppress it.

+ 1 - 1
Tests/RunCMake/CMP0026/clear-cached-information-stderr.txt

@@ -7,4 +7,4 @@
   specific short-term circumstances.  Projects should be ported to the NEW
   behavior and not rely on setting a policy to OLD.
 Call Stack \(most recent call first\):
-  CMakeLists.txt:[0-9]+ \(include\)$
+  CMakeLists\.txt:[0-9]+ \(include\)$

+ 1 - 1
Tests/RunCMake/CMP0051/CMP0051-OLD-stderr.txt

@@ -7,6 +7,6 @@
   specific short-term circumstances.  Projects should be ported to the NEW
   behavior and not rely on setting a policy to OLD.
 Call Stack \(most recent call first\):
-  CMakeLists.txt:3 \(include\)
+  CMakeLists\.txt:[0-9]+ \(include\)
 +
 Sources: "empty.cpp"$

+ 2 - 2
Tests/RunCMake/CMP0051/CMP0051-WARN-stderr.txt

@@ -9,7 +9,7 @@ CMake Warning \(dev\) at CMP0051-WARN.cmake:6 \(get_target_property\):
   needs to be adapted to ignore the generator expression using the
   string\(GENEX_STRIP\) command.
 Call Stack \(most recent call first\):
-  CMakeLists.txt:3 \(include\)
+  CMakeLists\.txt:[0-9]+ \(include\)
 This warning is for project developers.  Use -Wno-dev to suppress it.
 
 Sources: "empty.cpp"
@@ -25,7 +25,7 @@ CMake Warning \(dev\) at CMP0051-WARN.cmake:12 \(get_target_property\):
   needs to be adapted to ignore the generator expression using the
   string\(GENEX_STRIP\) command.
 Call Stack \(most recent call first\):
-  CMakeLists.txt:3 \(include\)
+  CMakeLists\.txt:[0-9]+ \(include\)
 This warning is for project developers.  Use -Wno-dev to suppress it.
 
 Sources: "../empty.cpp"$

+ 1 - 1
Tests/RunCMake/CommandLine/Wdeprecated-stderr.txt

@@ -1,4 +1,4 @@
 ^CMake Deprecation Warning at Wdeprecated.cmake:1 \(message\):
   Some deprecated warning
 Call Stack \(most recent call first\):
-  CMakeLists.txt:3 \(include\)
+  CMakeLists\.txt:[0-9]+ \(include\)

+ 2 - 2
Tests/RunCMake/CommandLine/Wdev-stderr.txt

@@ -1,11 +1,11 @@
 ^CMake Warning \(dev\) at Wdev.cmake:1 \(message\):
   Some author warning
 Call Stack \(most recent call first\):
-  CMakeLists.txt:3 \(include\)
+  CMakeLists\.txt:[0-9]+ \(include\)
 This warning is for project developers.  Use -Wno-dev to suppress it.
 
 CMake Warning \(dev\) at Wdev.cmake:6 \(include\):
   include\(\) given empty file name \(ignored\).
 Call Stack \(most recent call first\):
-  CMakeLists.txt:3 \(include\)
+  CMakeLists\.txt:[0-9]+ \(include\)
 This warning is for project developers.  Use -Wno-dev to suppress it.$

+ 1 - 1
Tests/RunCMake/CommandLine/Werror_deprecated-stderr.txt

@@ -1,4 +1,4 @@
 ^CMake Deprecation Error at Werror_deprecated.cmake:1 \(message\):
   Some deprecated warning
 Call Stack \(most recent call first\):
-  CMakeLists.txt:3 \(include\)
+  CMakeLists\.txt:[0-9]+ \(include\)

+ 2 - 2
Tests/RunCMake/CommandLine/Werror_dev-stderr.txt

@@ -1,11 +1,11 @@
 ^CMake Error \(dev\) at Werror_dev.cmake:4 \(include\):
   include\(\) given empty file name \(ignored\).
 Call Stack \(most recent call first\):
-  CMakeLists.txt:3 \(include\)
+  CMakeLists\.txt:[0-9]+ \(include\)
 This error is for project developers. Use -Wno-error=dev to suppress it.
 
 CMake Error \(dev\) at Werror_dev.cmake:7 \(message\):
   Some author warning
 Call Stack \(most recent call first\):
-  CMakeLists.txt:3 \(include\)
+  CMakeLists\.txt:[0-9]+ \(include\)
 This error is for project developers. Use -Wno-error=dev to suppress it.$

+ 1 - 1
Tests/RunCMake/CommandLine/Wno-error_deprecated-stderr.txt

@@ -1,4 +1,4 @@
 ^CMake Deprecation Warning at Wno-error_deprecated.cmake:2 \(message\):
   Some deprecated warning
 Call Stack \(most recent call first\):
-  CMakeLists.txt:3 \(include\)
+  CMakeLists\.txt:[0-9]+ \(include\)

+ 2 - 2
Tests/RunCMake/CommandLine/Wno-error_dev-stderr.txt

@@ -1,11 +1,11 @@
 ^CMake Warning \(dev\) at Wno-error_dev.cmake:2 \(message\):
   Some author warning
 Call Stack \(most recent call first\):
-  CMakeLists.txt:3 \(include\)
+  CMakeLists\.txt:[0-9]+ \(include\)
 This warning is for project developers.  Use -Wno-dev to suppress it.
 
 CMake Warning \(dev\) at Wno-error_dev.cmake:6 \(include\):
   include\(\) given empty file name \(ignored\).
 Call Stack \(most recent call first\):
-  CMakeLists.txt:3 \(include\)
+  CMakeLists\.txt:[0-9]+ \(include\)
 This warning is for project developers.  Use -Wno-dev to suppress it.$

+ 2 - 2
Tests/RunCMake/ExternalData/BadAlgoMap1-stderr.txt

@@ -5,5 +5,5 @@ CMake Error at .*/Modules/ExternalData.cmake:[0-9]+ \(message\):
 
   The transform name must be a valid C identifier.
 Call Stack \(most recent call first\):
-  BadAlgoMap1.cmake:[0-9]+ \(ExternalData_Add_Target\)
-  CMakeLists.txt:3 \(include\)
+  BadAlgoMap1\.cmake:[0-9]+ \(ExternalData_Add_Target\)
+  CMakeLists\.txt:[0-9]+ \(include\)

+ 2 - 2
Tests/RunCMake/ExternalData/BadAlgoMap2-stderr.txt

@@ -5,5 +5,5 @@ CMake Error at .*/Modules/ExternalData.cmake:[0-9]+ \(message\):
 
   The transform name must be a valid C identifier.
 Call Stack \(most recent call first\):
-  BadAlgoMap2.cmake:[0-9]+ \(ExternalData_Add_Target\)
-  CMakeLists.txt:3 \(include\)
+  BadAlgoMap2\.cmake:[0-9]+ \(ExternalData_Add_Target\)
+  CMakeLists\.txt:[0-9]+ \(include\)

+ 2 - 2
Tests/RunCMake/ExternalData/BadHashAlgo1-stderr.txt

@@ -4,5 +4,5 @@ CMake Error at .*/Modules/ExternalData.cmake:[0-9]+ \(message\):
     BAD
 Call Stack \(most recent call first\):
   .*
-  BadHashAlgo1.cmake:3 \(ExternalData_Expand_Arguments\)
-  CMakeLists.txt:3 \(include\)
+  BadHashAlgo1\.cmake:[0-9]+ \(ExternalData_Expand_Arguments\)
+  CMakeLists\.txt:[0-9]+ \(include\)

+ 2 - 2
Tests/RunCMake/ExternalData/BadOption1-stderr.txt

@@ -5,5 +5,5 @@ CMake Error at .*/Modules/ExternalData.cmake:[0-9]+ \(message\):
 
 Call Stack \(most recent call first\):
   .*
-  BadOption1.cmake:2 \(ExternalData_Add_Test\)
-  CMakeLists.txt:3 \(include\)
+  BadOption1\.cmake:[0-9]+ \(ExternalData_Add_Test\)
+  CMakeLists\.txt:[0-9]+ \(include\)

+ 2 - 2
Tests/RunCMake/ExternalData/BadOption2-stderr.txt

@@ -5,5 +5,5 @@ CMake Error at .*/Modules/ExternalData.cmake:[0-9]+ \(message\):
 
 Call Stack \(most recent call first\):
   .*
-  BadOption2.cmake:2 \(ExternalData_Add_Test\)
-  CMakeLists.txt:3 \(include\)
+  BadOption2\.cmake:[0-9]+ \(ExternalData_Add_Test\)
+  CMakeLists\.txt:[0-9]+ \(include\)

+ 2 - 2
Tests/RunCMake/ExternalData/BadRecurse1-stderr.txt

@@ -2,5 +2,5 @@ CMake Error at .*/Modules/ExternalData.cmake:[0-9]+ \(message\):
   Recurse option "RECURSE:" allowed only with directories.
 Call Stack \(most recent call first\):
   .*
-  BadRecurse1.cmake:2 \(ExternalData_Expand_Arguments\)
-  CMakeLists.txt:3 \(include\)
+  BadRecurse1\.cmake:[0-9]+ \(ExternalData_Expand_Arguments\)
+  CMakeLists\.txt:[0-9]+ \(include\)

+ 2 - 2
Tests/RunCMake/ExternalData/BadRecurse2-stderr.txt

@@ -2,5 +2,5 @@ CMake Error at .*/Modules/ExternalData.cmake:[0-9]+ \(message\):
   Recurse option "RECURSE:" allowed only with directories.
 Call Stack \(most recent call first\):
   .*
-  BadRecurse2.cmake:2 \(ExternalData_Expand_Arguments\)
-  CMakeLists.txt:3 \(include\)
+  BadRecurse2\.cmake:[0-9]+ \(ExternalData_Expand_Arguments\)
+  CMakeLists\.txt:[0-9]+ \(include\)

+ 2 - 2
Tests/RunCMake/ExternalData/BadRecurse3-stderr.txt

@@ -5,5 +5,5 @@ CMake Error at .*/Modules/ExternalData.cmake:[0-9]+ \(message\):
 
 Call Stack \(most recent call first\):
   .*
-  BadRecurse3.cmake:2 \(ExternalData_Expand_Arguments\)
-  CMakeLists.txt:3 \(include\)
+  BadRecurse3\.cmake:[0-9]+ \(ExternalData_Expand_Arguments\)
+  CMakeLists\.txt:[0-9]+ \(include\)

+ 2 - 2
Tests/RunCMake/ExternalData/BadSeries1-stderr.txt

@@ -15,5 +15,5 @@ CMake Error at .*/Modules/ExternalData.cmake:[0-9]+ \(message\):
 
 Call Stack \(most recent call first\):
   .*
-  BadSeries1.cmake:3 \(ExternalData_Expand_Arguments\)
-  CMakeLists.txt:3 \(include\)
+  BadSeries1\.cmake:[0-9]+ \(ExternalData_Expand_Arguments\)
+  CMakeLists\.txt:[0-9]+ \(include\)

+ 2 - 2
Tests/RunCMake/ExternalData/BadSeries2-stderr.txt

@@ -12,5 +12,5 @@ CMake Error at .*/Modules/ExternalData.cmake:[0-9]+ \(message\):
     \(x\)\(y\)\$
 Call Stack \(most recent call first\):
   .*
-  BadSeries2.cmake:3 \(ExternalData_Expand_Arguments\)
-  CMakeLists.txt:3 \(include\)
+  BadSeries2\.cmake:[0-9]+ \(ExternalData_Expand_Arguments\)
+  CMakeLists\.txt:[0-9]+ \(include\)

+ 2 - 2
Tests/RunCMake/ExternalData/BadSeries3-stderr.txt

@@ -2,5 +2,5 @@ CMake Error at .*/Modules/ExternalData.cmake:[0-9]+ \(message\):
   Series option ":" not allowed with associated files.
 Call Stack \(most recent call first\):
   .*
-  BadSeries3.cmake:2 \(ExternalData_Expand_Arguments\)
-  CMakeLists.txt:3 \(include\)
+  BadSeries3\.cmake:[0-9]+ \(ExternalData_Expand_Arguments\)
+  CMakeLists\.txt:[0-9]+ \(include\)

+ 2 - 2
Tests/RunCMake/ExternalData/Directory1-stderr.txt

@@ -10,5 +10,5 @@ CMake Error at .*/Modules/ExternalData.cmake:[0-9]+ \(message\):
   that is directory instead of a file!
 Call Stack \(most recent call first\):
   .*
-  Directory1.cmake:3 \(ExternalData_Add_Test\)
-  CMakeLists.txt:3 \(include\)
+  Directory1\.cmake:[0-9]+ \(ExternalData_Add_Test\)
+  CMakeLists\.txt:[0-9]+ \(include\)

+ 2 - 2
Tests/RunCMake/ExternalData/Directory2-stderr.txt

@@ -6,5 +6,5 @@ CMake Error at .*/Modules/ExternalData.cmake:[0-9]+ \(message\):
   must list associated files.
 Call Stack \(most recent call first\):
   .*
-  Directory2.cmake:3 \(ExternalData_Add_Test\)
-  CMakeLists.txt:3 \(include\)
+  Directory2\.cmake:[0-9]+ \(ExternalData_Add_Test\)
+  CMakeLists\.txt:[0-9]+ \(include\)

+ 2 - 2
Tests/RunCMake/ExternalData/Directory3-stderr.txt

@@ -10,6 +10,6 @@ CMake Warning \(dev\) at .*/Modules/ExternalData.cmake:[0-9]+ \(message\):
   that does not exist as a file \(with or without an extension\)!
 Call Stack \(most recent call first\):
   .*
-  Directory3.cmake:3 \(ExternalData_Add_Test\)
-  CMakeLists.txt:3 \(include\)
+  Directory3\.cmake:[0-9]+ \(ExternalData_Add_Test\)
+  CMakeLists\.txt:[0-9]+ \(include\)
 This warning is for project developers.  Use -Wno-dev to suppress it.

+ 2 - 2
Tests/RunCMake/ExternalData/Directory4-stderr.txt

@@ -2,5 +2,5 @@ CMake Error at .*/Modules/ExternalData.cmake:[0-9]+ \(message\):
   Series option ":" not allowed with directories.
 Call Stack \(most recent call first\):
   .*
-  Directory4.cmake:3 \(ExternalData_Add_Test\)
-  CMakeLists.txt:3 \(include\)
+  Directory4\.cmake:[0-9]+ \(ExternalData_Add_Test\)
+  CMakeLists\.txt:[0-9]+ \(include\)

+ 2 - 2
Tests/RunCMake/ExternalData/Directory5-stderr.txt

@@ -10,5 +10,5 @@ CMake Error at .*/Modules/ExternalData.cmake:[0-9]+ \(message\):
   that does not exist as a directory!
 Call Stack \(most recent call first\):
   .*
-  Directory5.cmake:3 \(ExternalData_Add_Test\)
-  CMakeLists.txt:3 \(include\)
+  Directory5\.cmake:[0-9]+ \(ExternalData_Add_Test\)
+  CMakeLists\.txt:[0-9]+ \(include\)

+ 2 - 2
Tests/RunCMake/ExternalData/MissingData-stderr.txt

@@ -10,6 +10,6 @@ CMake Warning \(dev\) at .*/Modules/ExternalData.cmake:[0-9]+ \(message\):
   that does not exist as a file \(with or without an extension\)!
 Call Stack \(most recent call first\):
   .*
-  MissingData.cmake:4 \(ExternalData_Expand_Arguments\)
-  CMakeLists.txt:3 \(include\)
+  MissingData\.cmake:[0-9]+ \(ExternalData_Expand_Arguments\)
+  CMakeLists\.txt:[0-9]+ \(include\)
 This warning is for project developers.  Use -Wno-dev to suppress it.

+ 2 - 2
Tests/RunCMake/ExternalData/MissingDataWithAssociated-stderr.txt

@@ -10,6 +10,6 @@ CMake Warning \(dev\) at .*/Modules/ExternalData.cmake:[0-9]+ \(message\):
   that does not exist as a file \(with or without an extension\)!
 Call Stack \(most recent call first\):
   .*
-  MissingDataWithAssociated.cmake:4 \(ExternalData_Expand_Arguments\)
-  CMakeLists.txt:3 \(include\)
+  MissingDataWithAssociated\.cmake:[0-9]+ \(ExternalData_Expand_Arguments\)
+  CMakeLists\.txt:[0-9]+ \(include\)
 This warning is for project developers.  Use -Wno-dev to suppress it.

+ 2 - 2
Tests/RunCMake/ExternalData/NoLinkInSource-stderr.txt

@@ -2,5 +2,5 @@ CMake Warning at .*/Modules/ExternalData.cmake:[0-9]+ \(message\):
   ExternalData_LINK_CONTENT cannot be used in-source
 Call Stack \(most recent call first\):
   .*
-  NoLinkInSource.cmake:8 \(ExternalData_Expand_Arguments\)
-  CMakeLists.txt:3 \(include\)
+  NoLinkInSource\.cmake:[0-9]+ \(ExternalData_Expand_Arguments\)
+  CMakeLists\.txt:[0-9]+ \(include\)

+ 2 - 2
Tests/RunCMake/ExternalData/NoURLTemplates-stderr.txt

@@ -1,5 +1,5 @@
 CMake Error at .*/Modules/ExternalData.cmake:[0-9]+ \(message\):
   Neither ExternalData_URL_TEMPLATES nor ExternalData_OBJECT_STORES is set!
 Call Stack \(most recent call first\):
-  NoURLTemplates.cmake:2 \(ExternalData_Add_Target\)
-  CMakeLists.txt:3 \(include\)
+  NoURLTemplates\.cmake:[0-9]+ \(ExternalData_Add_Target\)
+  CMakeLists\.txt:[0-9]+ \(include\)

+ 8 - 8
Tests/RunCMake/TargetPropertyGeneratorExpressions/BadInvalidName-stderr.txt

@@ -1,47 +1,47 @@
-^(CMake Error at BadInvalidName1/CMakeLists.txt:2 \(include_directories\):
+^(CMake Error at BadInvalidName1/CMakeLists\.txt:[0-9]+ \(include_directories\):
   Error evaluating generator expression:
 
     \$<TARGET_PROPERTY:Invali/dTarget,INCLUDE_DIRECTORIES>
 
   Target name not supported.
-+)+(CMake Error at BadInvalidName2/CMakeLists.txt:2 \(include_directories\):
++)+(CMake Error at BadInvalidName2/CMakeLists\.txt:[0-9]+ \(include_directories\):
   Error evaluating generator expression:
 
     \$<TARGET_PROPERTY:Invali/dTarget,Invali/dProperty>
 
   Target name and property name not supported.
-+)+(CMake Error at BadInvalidName3/CMakeLists.txt:2 \(include_directories\):
++)+(CMake Error at BadInvalidName3/CMakeLists\.txt:[0-9]+ \(include_directories\):
   Error evaluating generator expression:
 
     \$<TARGET_PROPERTY:Invali/dProperty>
 
   Property name not supported.
-+)+(CMake Error at BadInvalidName4/CMakeLists.txt:2 \(include_directories\):
++)+(CMake Error at BadInvalidName4/CMakeLists\.txt:[0-9]+ \(include_directories\):
   Error evaluating generator expression:
 
     \$<TARGET_PROPERTY:BadInvalidName4,Invali/dProperty>
 
   Property name not supported.
-+)+(CMake Error at BadInvalidName5/CMakeLists.txt:2 \(include_directories\):
++)+(CMake Error at BadInvalidName5/CMakeLists\.txt:[0-9]+ \(include_directories\):
   Error evaluating generator expression:
 
     \$<TARGET_PROPERTY:,>
 
   \$<TARGET_PROPERTY:tgt,prop> expression requires a non-empty target name and
   property name.
-+)+(CMake Error at BadInvalidName6/CMakeLists.txt:2 \(include_directories\):
++)+(CMake Error at BadInvalidName6/CMakeLists\.txt:[0-9]+ \(include_directories\):
   Error evaluating generator expression:
 
     \$<TARGET_PROPERTY:,ValidProperty>
 
   \$<TARGET_PROPERTY:tgt,prop> expression requires a non-empty target name.
-+)+(CMake Error at BadInvalidName7/CMakeLists.txt:2 \(include_directories\):
++)+(CMake Error at BadInvalidName7/CMakeLists\.txt:[0-9]+ \(include_directories\):
   Error evaluating generator expression:
 
     \$<TARGET_PROPERTY:BadInvalidName7,>
 
   \$<TARGET_PROPERTY:...> expression requires a non-empty property name.
-+)+(CMake Error at BadInvalidName8/CMakeLists.txt:2 \(include_directories\):
++)+(CMake Error at BadInvalidName8/CMakeLists\.txt:[0-9]+ \(include_directories\):
   Error evaluating generator expression:
 
     \$<TARGET_PROPERTY:>

+ 1 - 1
Tests/RunCMake/TargetPropertyGeneratorExpressions/BadNonTarget-stderr.txt

@@ -5,4 +5,4 @@ CMake Error at BadNonTarget.cmake:7 \(include_directories\):
 
   Target "NonExistent" not found.
 Call Stack \(most recent call first\):
-  CMakeLists.txt:8 \(include\)$
+  CMakeLists\.txt:[0-9]+ \(include\)$

+ 1 - 1
Tests/RunCMake/TargetPropertyGeneratorExpressions/LinkImplementationCycle1-stderr.txt

@@ -7,4 +7,4 @@ CMake Error at LinkImplementationCycle1.cmake:5 \(target_link_libraries\):
   target property which is transitive over the link libraries, creating a
   recursion.
 Call Stack \(most recent call first\):
-  CMakeLists.txt:8 \(include\)
+  CMakeLists\.txt:[0-9]+ \(include\)

+ 1 - 1
Tests/RunCMake/TargetPropertyGeneratorExpressions/LinkImplementationCycle2-stderr.txt

@@ -7,4 +7,4 @@ CMake Error at LinkImplementationCycle2.cmake:5 \(target_link_libraries\):
   target property which is transitive over the link libraries, creating a
   recursion.
 Call Stack \(most recent call first\):
-  CMakeLists.txt:8 \(include\)
+  CMakeLists\.txt:[0-9]+ \(include\)

+ 2 - 2
Tests/RunCMake/TargetSources/CMP0076-WARN-stderr.txt

@@ -1,4 +1,4 @@
-CMake Warning \(dev\) at CMP0076-WARN/CMakeLists.txt:2 \(target_sources\):
+CMake Warning \(dev\) at CMP0076-WARN/CMakeLists\.txt:[0-9]+ \(target_sources\):
   Policy CMP0076 is not set: target_sources\(\) command converts relative paths
   to absolute.  Run "cmake --help-policy CMP0076" for policy details.  Use
   the cmake_policy command to set the policy and suppress this warning.
@@ -6,7 +6,7 @@ CMake Warning \(dev\) at CMP0076-WARN/CMakeLists.txt:2 \(target_sources\):
   An interface source of target "publiclib" has a relative path.
 This warning is for project developers.  Use -Wno-dev to suppress it.
 
-CMake Warning \(dev\) at CMP0076-WARN/CMakeLists.txt:2 \(target_sources\):
+CMake Warning \(dev\) at CMP0076-WARN/CMakeLists\.txt:[0-9]+ \(target_sources\):
   Policy CMP0076 is not set: target_sources\(\) command converts relative paths
   to absolute.  Run "cmake --help-policy CMP0076" for policy details.  Use
   the cmake_policy command to set the policy and suppress this warning.

+ 4 - 4
Tests/RunCMake/TargetSources/OriginDebug-stderr.txt

@@ -4,7 +4,7 @@ CMake Debug Log at OriginDebug.cmake:13 \(add_library\):
    \* .*Tests/RunCMake/TargetSources/empty_2.cpp
 
 Call Stack \(most recent call first\):
-  CMakeLists.txt:3 \(include\)
+  CMakeLists\.txt:[0-9]+ \(include\)
 .*
 CMake Debug Log at OriginDebug.cmake:16 \(set_property\):
   Used sources for target OriginDebug:
@@ -12,7 +12,7 @@ CMake Debug Log at OriginDebug.cmake:16 \(set_property\):
    \* .*Tests/RunCMake/TargetSources/empty_3.cpp
 
 Call Stack \(most recent call first\):
-  CMakeLists.txt:3 \(include\)
+  CMakeLists\.txt:[0-9]+ \(include\)
 .*
 CMake Debug Log at OriginDebug.cmake:20 \(target_sources\):
   Used sources for target OriginDebug:
@@ -20,7 +20,7 @@ CMake Debug Log at OriginDebug.cmake:20 \(target_sources\):
    \* .*Tests/RunCMake/TargetSources/empty_4.cpp
 
 Call Stack \(most recent call first\):
-  CMakeLists.txt:3 \(include\)
+  CMakeLists\.txt:[0-9]+ \(include\)
 .*
 CMake Debug Log at OriginDebug.cmake:14 \(target_link_libraries\):
   Used sources for target OriginDebug:
@@ -28,4 +28,4 @@ CMake Debug Log at OriginDebug.cmake:14 \(target_link_libraries\):
    \* .*Tests/RunCMake/TargetSources/empty_1.cpp
 
 Call Stack \(most recent call first\):
-  CMakeLists.txt:3 \(include\)
+  CMakeLists\.txt:[0-9]+ \(include\)

+ 1 - 0
Tests/RunCMake/add_subdirectory/CMP0082-ExcludeFromAll/CMakeLists.txt

@@ -0,0 +1 @@
+install(CODE "message(STATUS \"exclude\")")

+ 4 - 0
Tests/RunCMake/add_subdirectory/CMP0082-NEW-install-component-stdout.txt

@@ -0,0 +1,4 @@
+^-- Install configuration: "[^\n]*"
+-- Install component: "Unspecified"
+-- sub
+-- top$

+ 3 - 0
Tests/RunCMake/add_subdirectory/CMP0082-NEW-install-stdout.txt

@@ -0,0 +1,3 @@
+^-- Install configuration: "[^\n]*"
+-- sub
+-- top$

+ 3 - 0
Tests/RunCMake/add_subdirectory/CMP0082-NEW.cmake

@@ -0,0 +1,3 @@
+add_subdirectory(CMP0082)
+add_subdirectory(CMP0082-ExcludeFromAll EXCLUDE_FROM_ALL)
+install(CODE "message(STATUS \"top\")")

+ 1 - 0
Tests/RunCMake/add_subdirectory/CMP0082-Nested/CMakeLists.txt

@@ -0,0 +1 @@
+add_subdirectory(sub)

+ 1 - 0
Tests/RunCMake/add_subdirectory/CMP0082-Nested/sub/CMakeLists.txt

@@ -0,0 +1 @@
+install(CODE "message(STATUS \"sub\")")

+ 2 - 0
Tests/RunCMake/add_subdirectory/CMP0082-NestedSub/CMakeLists.txt

@@ -0,0 +1,2 @@
+add_subdirectory(sub)
+install(CODE "message(STATUS \"top\")")

+ 1 - 0
Tests/RunCMake/add_subdirectory/CMP0082-NestedSub/sub/CMakeLists.txt

@@ -0,0 +1 @@
+install(CODE "message(STATUS \"sub\")")

+ 0 - 0
Tests/RunCMake/add_subdirectory/CMP0082-None/CMakeLists.txt


+ 4 - 0
Tests/RunCMake/add_subdirectory/CMP0082-OLD-install-component-stdout.txt

@@ -0,0 +1,4 @@
+^-- Install configuration: "[^\n]*"
+-- Install component: "Unspecified"
+-- top
+-- sub$

+ 3 - 0
Tests/RunCMake/add_subdirectory/CMP0082-OLD-install-stdout.txt

@@ -0,0 +1,3 @@
+^-- Install configuration: "[^\n]*"
+-- top
+-- sub$

+ 3 - 0
Tests/RunCMake/add_subdirectory/CMP0082-OLD.cmake

@@ -0,0 +1,3 @@
+add_subdirectory(CMP0082)
+add_subdirectory(CMP0082-ExcludeFromAll EXCLUDE_FROM_ALL)
+install(CODE "message(STATUS \"top\")")

+ 4 - 0
Tests/RunCMake/add_subdirectory/CMP0082-WARN-Nested-install-component-stdout.txt

@@ -0,0 +1,4 @@
+^-- Install configuration: "[^\n]*"
+-- Install component: "Unspecified"
+-- top
+-- sub$

+ 3 - 0
Tests/RunCMake/add_subdirectory/CMP0082-WARN-Nested-install-stdout.txt

@@ -0,0 +1,3 @@
+^-- Install configuration: "[^\n]*"
+-- top
+-- sub$

+ 7 - 0
Tests/RunCMake/add_subdirectory/CMP0082-WARN-Nested-stderr.txt

@@ -0,0 +1,7 @@
+CMake Warning \(dev\) in CMakeLists\.txt:
+  Policy CMP0082 is not set: Install rules from add_subdirectory\(\) are
+  interleaved with those in caller\.  Run "cmake --help-policy CMP0082" for
+  policy details\.  Use the cmake_policy command to set the policy and
+  suppress this warning\.
+
+This warning is for project developers\.  Use -Wno-dev to suppress it\.

+ 2 - 0
Tests/RunCMake/add_subdirectory/CMP0082-WARN-Nested.cmake

@@ -0,0 +1,2 @@
+add_subdirectory(CMP0082-Nested)
+install(CODE "message(STATUS \"top\")")

+ 4 - 0
Tests/RunCMake/add_subdirectory/CMP0082-WARN-NestedSub-install-component-stdout.txt

@@ -0,0 +1,4 @@
+^-- Install configuration: "[^\n]*"
+-- Install component: "Unspecified"
+-- top
+-- sub$

+ 3 - 0
Tests/RunCMake/add_subdirectory/CMP0082-WARN-NestedSub-install-stdout.txt

@@ -0,0 +1,3 @@
+^-- Install configuration: "[^\n]*"
+-- top
+-- sub$

+ 7 - 0
Tests/RunCMake/add_subdirectory/CMP0082-WARN-NestedSub-stderr.txt

@@ -0,0 +1,7 @@
+CMake Warning \(dev\) in CMP0082-NestedSub/CMakeLists\.txt:
+  Policy CMP0082 is not set: Install rules from add_subdirectory\(\) are
+  interleaved with those in caller\.  Run "cmake --help-policy CMP0082" for
+  policy details\.  Use the cmake_policy command to set the policy and
+  suppress this warning\.
+
+This warning is for project developers\.  Use -Wno-dev to suppress it\.

+ 1 - 0
Tests/RunCMake/add_subdirectory/CMP0082-WARN-NestedSub.cmake

@@ -0,0 +1 @@
+add_subdirectory(CMP0082-NestedSub)

+ 3 - 0
Tests/RunCMake/add_subdirectory/CMP0082-WARN-NoTopInstall-install-component-stdout.txt

@@ -0,0 +1,3 @@
+^-- Install configuration: "[^\n]*"
+-- Install component: "Unspecified"
+-- sub$

+ 2 - 0
Tests/RunCMake/add_subdirectory/CMP0082-WARN-NoTopInstall-install-stdout.txt

@@ -0,0 +1,2 @@
+^-- Install configuration: "[^\n]*"
+-- sub$

+ 1 - 0
Tests/RunCMake/add_subdirectory/CMP0082-WARN-NoTopInstall.cmake

@@ -0,0 +1 @@
+add_subdirectory(CMP0082)

+ 3 - 0
Tests/RunCMake/add_subdirectory/CMP0082-WARN-None-install-component-stdout.txt

@@ -0,0 +1,3 @@
+^-- Install configuration: "[^\n]*"
+-- Install component: "Unspecified"
+-- top$

+ 2 - 0
Tests/RunCMake/add_subdirectory/CMP0082-WARN-None-install-stdout.txt

@@ -0,0 +1,2 @@
+^-- Install configuration: "[^\n]*"
+-- top$

+ 2 - 0
Tests/RunCMake/add_subdirectory/CMP0082-WARN-None.cmake

@@ -0,0 +1,2 @@
+add_subdirectory(CMP0082-None)
+install(CODE "message(STATUS \"top\")")

+ 4 - 0
Tests/RunCMake/add_subdirectory/CMP0082-WARN-install-component-stdout.txt

@@ -0,0 +1,4 @@
+^-- Install configuration: "[^\n]*"
+-- Install component: "Unspecified"
+-- top
+-- sub$

+ 3 - 0
Tests/RunCMake/add_subdirectory/CMP0082-WARN-install-stdout.txt

@@ -0,0 +1,3 @@
+^-- Install configuration: "[^\n]*"
+-- top
+-- sub$

+ 7 - 0
Tests/RunCMake/add_subdirectory/CMP0082-WARN-stderr.txt

@@ -0,0 +1,7 @@
+CMake Warning \(dev\) in CMakeLists\.txt:
+  Policy CMP0082 is not set: Install rules from add_subdirectory\(\) are
+  interleaved with those in caller\.  Run "cmake --help-policy CMP0082" for
+  policy details\.  Use the cmake_policy command to set the policy and
+  suppress this warning\.
+
+This warning is for project developers\.  Use -Wno-dev to suppress it\.

+ 3 - 0
Tests/RunCMake/add_subdirectory/CMP0082-WARN.cmake

@@ -0,0 +1,3 @@
+add_subdirectory(CMP0082)
+add_subdirectory(CMP0082-ExcludeFromAll EXCLUDE_FROM_ALL)
+install(CODE "message(STATUS \"top\")")

+ 1 - 0
Tests/RunCMake/add_subdirectory/CMP0082/CMakeLists.txt

@@ -0,0 +1 @@
+install(CODE "message(STATUS \"sub\")")

+ 7 - 0
Tests/RunCMake/add_subdirectory/CMakeLists.txt

@@ -1,3 +1,10 @@
 cmake_minimum_required(VERSION 3.2)
+
+# Have to set policy here due to policy scope
+if(DEFINED CMP0082_VALUE)
+  cmake_policy(SET CMP0082 "${CMP0082_VALUE}")
+endif()
+set(CMAKE_POLICY_WARNING_CMP0082 ON)
+
 project(${RunCMake_TEST} NONE)
 include(${RunCMake_TEST}.cmake)

+ 1 - 1
Tests/RunCMake/add_subdirectory/DoesNotExist-stderr.txt

@@ -2,4 +2,4 @@
   add_subdirectory given source "DoesNotExist" which is not an existing
   directory.
 Call Stack \(most recent call first\):
-  CMakeLists.txt:3 \(include\)$
+  CMakeLists\.txt:[0-9]+ \(include\)$

+ 1 - 1
Tests/RunCMake/add_subdirectory/Missing-stderr.txt

@@ -5,4 +5,4 @@
 
   does not contain a CMakeLists.txt file.
 Call Stack \(most recent call first\):
-  CMakeLists.txt:3 \(include\)$
+  CMakeLists\.txt:[0-9]+ \(include\)$

+ 22 - 0
Tests/RunCMake/add_subdirectory/RunCMakeTest.cmake

@@ -4,6 +4,28 @@ run_cmake(DoesNotExist)
 run_cmake(Missing)
 run_cmake(Function)
 
+macro(run_cmake_install case)
+  set(RunCMake_TEST_BINARY_DIR ${RunCMake_BINARY_DIR}/${case}-build)
+  set(RunCMake_TEST_NO_CLEAN 1)
+  set(RunCMake_TEST_OPTIONS ${ARGN})
+
+  run_cmake(${case})
+  run_cmake_command(${case}-install ${CMAKE_COMMAND} -P cmake_install.cmake)
+  run_cmake_command(${case}-install-component ${CMAKE_COMMAND} -DCOMPONENT=Unspecified -P cmake_install.cmake)
+
+  unset(RunCMake_TEST_BINARY_DIR)
+  unset(RunCMake_TEST_NO_CLEAN)
+  unset(RunCMake_TEST_OPTIONS)
+endmacro()
+
+run_cmake_install(CMP0082-WARN)
+run_cmake_install(CMP0082-WARN-Nested)
+run_cmake_install(CMP0082-WARN-NestedSub)
+run_cmake_install(CMP0082-WARN-None)
+run_cmake_install(CMP0082-WARN-NoTopInstall)
+run_cmake_install(CMP0082-OLD -DCMP0082_VALUE=OLD)
+run_cmake_install(CMP0082-NEW -DCMP0082_VALUE=NEW)
+
 set(RunCMake_TEST_BINARY_DIR ${RunCMake_BINARY_DIR}/ExcludeFromAll-build)
 set(RunCMake_TEST_NO_CLEAN 1)
 

+ 1 - 1
Tests/RunCMake/file/FileOpenFailRead-stderr.txt

@@ -3,4 +3,4 @@ CMake Error at FileOpenFailRead.cmake:[0-9]+ \(file\):
 
     .*/Tests/RunCMake/file/does_not_exist/file.txt
 Call Stack \(most recent call first\):
-  CMakeLists.txt:3 \(include\)
+  CMakeLists\.txt:[0-9]+ \(include\)

+ 6 - 6
Tests/RunCMake/file/INSTALL-MESSAGE-bad-stderr.txt

@@ -2,31 +2,31 @@ CMake Error at INSTALL-MESSAGE-bad.cmake:1 \(file\):
   file INSTALL options MESSAGE_ALWAYS, MESSAGE_LAZY, and MESSAGE_NEVER are
   mutually exclusive.
 Call Stack \(most recent call first\):
-  CMakeLists.txt:3 \(include\)
+  CMakeLists\.txt:[0-9]+ \(include\)
 +
 CMake Error at INSTALL-MESSAGE-bad.cmake:2 \(file\):
   file INSTALL options MESSAGE_ALWAYS, MESSAGE_LAZY, and MESSAGE_NEVER are
   mutually exclusive.
 Call Stack \(most recent call first\):
-  CMakeLists.txt:3 \(include\)
+  CMakeLists\.txt:[0-9]+ \(include\)
 +
 CMake Error at INSTALL-MESSAGE-bad.cmake:3 \(file\):
   file INSTALL options MESSAGE_ALWAYS, MESSAGE_LAZY, and MESSAGE_NEVER are
   mutually exclusive.
 Call Stack \(most recent call first\):
-  CMakeLists.txt:3 \(include\)
+  CMakeLists\.txt:[0-9]+ \(include\)
 +
 CMake Error at INSTALL-MESSAGE-bad.cmake:4 \(file\):
   file option MESSAGE_ALWAYS may not appear after PATTERN or REGEX.
 Call Stack \(most recent call first\):
-  CMakeLists.txt:3 \(include\)
+  CMakeLists\.txt:[0-9]+ \(include\)
 +
 CMake Error at INSTALL-MESSAGE-bad.cmake:5 \(file\):
   file option MESSAGE_LAZY may not appear after PATTERN or REGEX.
 Call Stack \(most recent call first\):
-  CMakeLists.txt:3 \(include\)
+  CMakeLists\.txt:[0-9]+ \(include\)
 +
 CMake Error at INSTALL-MESSAGE-bad.cmake:6 \(file\):
   file option MESSAGE_NEVER may not appear after PATTERN or REGEX.
 Call Stack \(most recent call first\):
-  CMakeLists.txt:3 \(include\)
+  CMakeLists\.txt:[0-9]+ \(include\)

+ 1 - 1
Tests/RunCMake/get_property/BadArgument-stderr.txt

@@ -1,4 +1,4 @@
 ^CMake Error at BadArgument.cmake:1 \(get_property\):
   get_property given invalid argument "FOO".
 Call Stack \(most recent call first\):
-  CMakeLists.txt:3 \(include\)$
+  CMakeLists\.txt:[0-9]+ \(include\)$

+ 1 - 1
Tests/RunCMake/get_property/BadDirectory-stderr.txt

@@ -3,4 +3,4 @@
   found.  This could be because the directory argument was invalid or, it is
   valid but has not been processed yet.
 Call Stack \(most recent call first\):
-  CMakeLists.txt:3 \(include\)$
+  CMakeLists\.txt:[0-9]+ \(include\)$

+ 1 - 1
Tests/RunCMake/get_property/BadScope-stderr.txt

@@ -2,4 +2,4 @@
   get_property given invalid scope FOO.  Valid scopes are GLOBAL, DIRECTORY,
   TARGET, SOURCE, TEST, VARIABLE, CACHE, INSTALL.
 Call Stack \(most recent call first\):
-  CMakeLists.txt:3 \(include\)$
+  CMakeLists\.txt:[0-9]+ \(include\)$

+ 1 - 1
Tests/RunCMake/get_property/BadTarget-stderr.txt

@@ -2,4 +2,4 @@
   get_property could not find TARGET FOO.  Perhaps it has not yet been
   created.
 Call Stack \(most recent call first\):
-  CMakeLists.txt:3 \(include\)$
+  CMakeLists\.txt:[0-9]+ \(include\)$

برخی فایل ها در این مقایسه diff نمایش داده نمی شوند زیرا تعداد فایل ها بسیار زیاد است