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.
This policy was introduced in CMake version 3.3.
Prior to removal in CMake version 4.0, it could be
set by cmake_policy()
or cmake_minimum_required()
.
If it was not set, CMake warned, and used OLD
behavior.