CMP0080¶
3.13 版本新增。
BundleUtilities 不能在配置时包含。
BundleUtilities 模块提供的宏 intended to be invoked at install time rather than at configure time, because they depend on the listed targets already existing at the time they are invoked. If they are invoked at configure time, the targets haven't been built yet, and the commands will fail. (在安装时调用,而不是在配置时调用,因为它们依赖于在调用时已存在的已列出的目标。如果在配置时调用它们,目标尚未构建,并且命令将失败。)
此策略限制了 BundleUtilities 的包含,仅限于 cmake -P 风格的脚本和安装规则。具体来说,它会检查 CMAKE_GENERATOR 的存在,如果存在则抛出致命错误。
此策略的 OLD 行为是允许在配置时包含 BundleUtilities。此策略的 NEW 行为是禁止此类包含。
此策略在 CMake 版本 3.13 中引入。它可以由 cmake_policy() 或 cmake_minimum_required() 设置。如果未设置,CMake 将发出警告并使用 OLD 行为。
注意
策略的 OLD 行为 根据定义已被弃用,并可能在未来的 CMake 版本中被移除。