CMP0062

警告

該方針的 OLD 行為已在 CMake 版本 4.0 中移除。該方針必須透過呼叫 cmake_minimum_required()cmake_policy() 設定為 NEW

在 3.3 版被加入.

Disallow install() of export() result.

The export() command generates a file containing Imported Targets, which is suitable for use from the build directory. It is not suitable for installation because it contains absolute paths to buildsystem locations, and is particular to a single build configuration.

The install(EXPORT) generates and installs files which contain Imported Targets. These files are generated with relative paths (unless the user specifies absolute paths), and are designed for multi-configuration use. See 建立軟體包 for more.

CMake 3.3 不再允許將 export() 命令的結果用於 install(FILES) 命令。

The OLD behavior for this policy is to allow installing the result of an export() command. The NEW behavior for this policy is not to allow installing the result of an export() command.

此方針於 CMake 版本 3.3 中引入。在 CMake 版本 4.0 移除之前,它可以透過 cmake_policy()cmake_minimum_required() 設定。如果未設定,CMake warned,並使用 OLD 行為。