浏览代码

CMP0006: Remove support for OLD behavior

Brad King 1 年之前
父节点
当前提交
5fd46699fc
共有 3 个文件被更改,包括 6 次插入31 次删除
  1. 5 4
      Help/policy/CMP0006.rst
  2. 0 26
      Source/cmInstallCommand.cxx
  3. 1 1
      Source/cmPolicies.h

+ 5 - 4
Help/policy/CMP0006.rst

@@ -1,6 +1,9 @@
 CMP0006
 CMP0006
 -------
 -------
 
 
+.. |REMOVED_IN_CMAKE_VERSION| replace:: 4.0
+.. include:: REMOVED_PROLOGUE.txt
+
 Installing :prop_tgt:`MACOSX_BUNDLE` targets requires a ``BUNDLE DESTINATION``.
 Installing :prop_tgt:`MACOSX_BUNDLE` targets requires a ``BUNDLE DESTINATION``.
 
 
 This policy determines whether the :command:`install(TARGETS)` command must be
 This policy determines whether the :command:`install(TARGETS)` command must be
@@ -18,7 +21,5 @@ behavior for this policy is to produce an error if a bundle target is installed
 without a ``BUNDLE DESTINATION``.
 without a ``BUNDLE DESTINATION``.
 
 
 .. |INTRODUCED_IN_CMAKE_VERSION| replace:: 2.6.0
 .. |INTRODUCED_IN_CMAKE_VERSION| replace:: 2.6.0
-.. |WARNS_OR_DOES_NOT_WARN| replace:: warns
-.. include:: STANDARD_ADVICE.txt
-
-.. include:: DEPRECATED.txt
+.. |WARNED_OR_DID_NOT_WARN| replace:: warned
+.. include:: REMOVED_EPILOGUE.txt

+ 0 - 26
Source/cmInstallCommand.cxx

@@ -105,7 +105,6 @@ public:
   bool MakeFilesFullPath(const char* modeName, const std::string& basePath,
   bool MakeFilesFullPath(const char* modeName, const std::string& basePath,
                          const std::vector<std::string>& relFiles,
                          const std::vector<std::string>& relFiles,
                          std::vector<std::string>& absFiles);
                          std::vector<std::string>& absFiles);
-  bool CheckCMP0006() const;
 
 
   std::string GetDestination(const cmInstallCommandArguments* args,
   std::string GetDestination(const cmInstallCommandArguments* args,
                              const std::string& varName,
                              const std::string& varName,
@@ -1017,13 +1016,6 @@ bool HandleTargetsMode(std::vector<std::string> const& args,
           if (!bundleArgs.GetDestination().empty()) {
           if (!bundleArgs.GetDestination().empty()) {
             bundleGenerator = CreateInstallTargetGenerator(
             bundleGenerator = CreateInstallTargetGenerator(
               target, bundleArgs, false, helper.Makefile->GetBacktrace());
               target, bundleArgs, false, helper.Makefile->GetBacktrace());
-          } else if (!runtimeArgs.GetDestination().empty()) {
-            if (helper.CheckCMP0006()) {
-              // For CMake 2.4 compatibility fallback to the RUNTIME
-              // properties.
-              bundleGenerator = CreateInstallTargetGenerator(
-                target, runtimeArgs, false, helper.Makefile->GetBacktrace());
-            }
           }
           }
           if (!bundleGenerator) {
           if (!bundleGenerator) {
             status.SetError(cmStrCat("TARGETS given no BUNDLE DESTINATION for "
             status.SetError(cmStrCat("TARGETS given no BUNDLE DESTINATION for "
@@ -2482,24 +2474,6 @@ bool Helper::MakeFilesFullPath(const char* modeName,
   return true;
   return true;
 }
 }
 
 
-bool Helper::CheckCMP0006() const
-{
-  switch (this->Makefile->GetPolicyStatus(cmPolicies::CMP0006)) {
-    case cmPolicies::WARN:
-      this->Makefile->IssueMessage(
-        MessageType::AUTHOR_WARNING,
-        cmPolicies::GetPolicyWarning(cmPolicies::CMP0006));
-      CM_FALLTHROUGH;
-    case cmPolicies::OLD:
-      // OLD behavior is to allow compatibility
-      return true;
-    case cmPolicies::NEW:
-      // NEW behavior is to disallow compatibility
-      break;
-  }
-  return false;
-}
-
 std::string Helper::GetDestination(const cmInstallCommandArguments* args,
 std::string Helper::GetDestination(const cmInstallCommandArguments* args,
                                    const std::string& varName,
                                    const std::string& varName,
                                    const std::string& guess) const
                                    const std::string& guess) const

+ 1 - 1
Source/cmPolicies.h

@@ -33,7 +33,7 @@ class cmMakefile;
          6, 0, NEW)                                                           \
          6, 0, NEW)                                                           \
   SELECT(POLICY, CMP0006,                                                     \
   SELECT(POLICY, CMP0006,                                                     \
          "Installing MACOSX_BUNDLE targets requires a BUNDLE DESTINATION.",   \
          "Installing MACOSX_BUNDLE targets requires a BUNDLE DESTINATION.",   \
-         2, 6, 0, WARN)                                                       \
+         2, 6, 0, NEW)                                                        \
   SELECT(POLICY, CMP0007, "list command no longer ignores empty elements.",   \
   SELECT(POLICY, CMP0007, "list command no longer ignores empty elements.",   \
          2, 6, 0, WARN)                                                       \
          2, 6, 0, WARN)                                                       \
   SELECT(                                                                     \
   SELECT(                                                                     \