CMP0041¶
警告
該方針的 OLD 行為已在 CMake 版本 4.0 中移除。該方針必須透過呼叫 cmake_minimum_required() 或 cmake_policy() 設定為 NEW。
Error on relative include with generator expression.
Diagnostics in CMake 2.8.12 and lower silently ignored an entry in the
INTERFACE_INCLUDE_DIRECTORIES of a target if it contained a generator
expression at any position.
The path entries in that target property should not be relative. High-level API should ensure that by adding either a source directory or a install directory prefix, as appropriate.
As an additional diagnostic, the INTERFACE_INCLUDE_DIRECTORIES generated
on an IMPORTED target for the install location should not contain
paths in the source directory or the build directory.
The OLD behavior for this policy is to ignore relative path entries if they
contain a generator expression. The NEW behavior for this policy is to report
an error if a generator expression appears in another location and the path is
relative.
此方針於 CMake 版本 3.0 中引入。在 CMake 版本 4.0 移除之前,它可以透過 cmake_policy() 或 cmake_minimum_required() 設定。如果未設定,CMake warned,並使用 OLD 行為。