summaryrefslogtreecommitdiffstats
path: root/Help
diff options
context:
space:
mode:
authorMarc Chevrier <marc.chevrier@gmail.com>2020-01-10 18:13:09 (GMT)
committerMarc Chevrier <marc.chevrier@gmail.com>2020-01-11 00:25:25 (GMT)
commit2678e310537a965b531cfc2c1f54fc72aac9d7d5 (patch)
tree6eaba42609646e732b70a71302095b87853d543e /Help
parent3795dea6f1d4ca9bc1a2131173ed190f6c362fbe (diff)
downloadCMake-2678e310537a965b531cfc2c1f54fc72aac9d7d5.zip
CMake-2678e310537a965b531cfc2c1f54fc72aac9d7d5.tar.gz
CMake-2678e310537a965b531cfc2c1f54fc72aac9d7d5.tar.bz2
target_compile_options: ensure BEFORE keyword is handled in all scopes
Fixes: #20200
Diffstat (limited to 'Help')
-rw-r--r--Help/manual/cmake-policies.7.rst1
-rw-r--r--Help/policy/CMP0101.rst20
-rw-r--r--Help/release/dev/target_compile_options-BEFORE-keyword.rst5
3 files changed, 26 insertions, 0 deletions
diff --git a/Help/manual/cmake-policies.7.rst b/Help/manual/cmake-policies.7.rst
index 1fd49ed..53cf264 100644
--- a/Help/manual/cmake-policies.7.rst
+++ b/Help/manual/cmake-policies.7.rst
@@ -57,6 +57,7 @@ Policies Introduced by CMake 3.17
.. toctree::
:maxdepth: 1
+ CMP0101: target_compile_options honors BEFORE keyword in all scopes. </policy/CMP0101>
CMP0100: Let AUTOMOC and AUTOUIC process .hh header files. </policy/CMP0100>
CMP0099: Link properties are transitive over private dependency on static libraries. </policy/CMP0099>
CMP0098: FindFLEX runs flex in CMAKE_CURRENT_BINARY_DIR when executing. </policy/CMP0098>
diff --git a/Help/policy/CMP0101.rst b/Help/policy/CMP0101.rst
new file mode 100644
index 0000000..9941acf
--- /dev/null
+++ b/Help/policy/CMP0101.rst
@@ -0,0 +1,20 @@
+CMP0101
+-------
+
+:command:`target_compile_options` now honors ``BEFORE`` keyword in all scopes.
+
+In CMake 3.16 and below the :command:`target_compile_options` ignores the
+``BEFORE`` keyword in private scope. CMake 3.17 and later honors
+``BEFORE`` keyword in all scopes. This policy provides compatibility for
+projects that have not been updated to expect the new behavior.
+
+The ``OLD`` behavior for this policy is to not honor ``BEFORE`` keyword in
+private scope. The ``NEW`` behavior of this policy is to honor
+``BEFORE`` keyword in all scopes.
+
+This policy was introduced in CMake version 3.17. Use the
+:command:`cmake_policy` command to set it to ``OLD`` or ``NEW`` explicitly.
+Unlike many policies, CMake version |release| does *not* warn
+when this policy is not set and simply uses ``OLD`` behavior.
+
+.. include:: DEPRECATED.txt
diff --git a/Help/release/dev/target_compile_options-BEFORE-keyword.rst b/Help/release/dev/target_compile_options-BEFORE-keyword.rst
new file mode 100644
index 0000000..8dafddd
--- /dev/null
+++ b/Help/release/dev/target_compile_options-BEFORE-keyword.rst
@@ -0,0 +1,5 @@
+target_compile_options-BEFORE-keyword
+-------------------------------------
+
+* :command:`target_compile_options` command learns to honor ``BEFORE`` keyword
+ in all scopes. See policy :policy:`CMP0101`.