summaryrefslogtreecommitdiffstats
path: root/Help/policy/CMP0041.rst
diff options
context:
space:
mode:
authorStephen Kelly <steveire@gmail.com>2013-11-26 10:24:47 (GMT)
committerStephen Kelly <steveire@gmail.com>2013-11-26 12:01:55 (GMT)
commit5838aba1aae5c341941c0779cd947ed0172e3a61 (patch)
tree3af0ca6398b63a642beecfc2fa7a05680f9d1477 /Help/policy/CMP0041.rst
parent7a3e45b9d469e468e4db867d51e92ceeed132b79 (diff)
downloadCMake-5838aba1aae5c341941c0779cd947ed0172e3a61.zip
CMake-5838aba1aae5c341941c0779cd947ed0172e3a61.tar.gz
CMake-5838aba1aae5c341941c0779cd947ed0172e3a61.tar.bz2
Export: Report error on relative include with genex.
Diagnostics which check the sanity of exported include paths previously skipped over any path containing a generator expression. Introduce a policy to issue an error message in such cases. The export files created in the OLD behavior are not usable, because they contain relative paths or paths to the source or build location which are not suitable for use on installation. CMake will report an error on import.
Diffstat (limited to 'Help/policy/CMP0041.rst')
-rw-r--r--Help/policy/CMP0041.rst25
1 files changed, 25 insertions, 0 deletions
diff --git a/Help/policy/CMP0041.rst b/Help/policy/CMP0041.rst
new file mode 100644
index 0000000..acb85af
--- /dev/null
+++ b/Help/policy/CMP0041.rst
@@ -0,0 +1,25 @@
+CMP0041
+-------
+
+Error on relative include with generator expression.
+
+Diagnostics in CMake 2.8.12 and lower silently ignored an entry in the
+:prop_tgt:`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 :prop_tgt:`INTERFACE_INCLUDE_DIRECTORIES` generated
+on an :prop_tgt:`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.
+
+This policy was introduced in CMake version 3.0.0. CMake version
+|release| warns when the policy is not set and uses OLD behavior. Use
+the cmake_policy command to set it to OLD or NEW explicitly.