summaryrefslogtreecommitdiffstats
path: root/Help
diff options
context:
space:
mode:
authorMarc Chevrier <marc.chevrier@sap.com>2017-11-30 14:06:21 (GMT)
committerMarc Chevrier <marc.chevrier@sap.com>2017-12-05 13:47:39 (GMT)
commit9432f686e62082045f53bd0ec8f8911966476df1 (patch)
tree9e03e1ae0c08fa693fbfb741b763d45c78b5feef /Help
parentd06b8264212c893b5da8d7499328eb403aaaad37 (diff)
downloadCMake-9432f686e62082045f53bd0ec8f8911966476df1.zip
CMake-9432f686e62082045f53bd0ec8f8911966476df1.tar.gz
CMake-9432f686e62082045f53bd0ec8f8911966476df1.tar.bz2
Add generator expression support to per-source COMPILE_DEFINITIONS
This allows users to specify different genex-based compile definitions for each file in a target. Fixes: #17508
Diffstat (limited to 'Help')
-rw-r--r--Help/prop_sf/COMPILE_DEFINITIONS.rst10
-rw-r--r--Help/release/dev/src-COMPILE_DEFINITIONS-genex.rst5
2 files changed, 15 insertions, 0 deletions
diff --git a/Help/prop_sf/COMPILE_DEFINITIONS.rst b/Help/prop_sf/COMPILE_DEFINITIONS.rst
index 1626825..8d2108c 100644
--- a/Help/prop_sf/COMPILE_DEFINITIONS.rst
+++ b/Help/prop_sf/COMPILE_DEFINITIONS.rst
@@ -17,3 +17,13 @@ by the native build tool. Xcode does not support per-configuration
definitions on source files.
.. include:: /include/COMPILE_DEFINITIONS_DISCLAIMER.txt
+
+Contents of ``COMPILE_DEFINITIONS`` may use "generator expressions"
+with the syntax ``$<...>``. See the :manual:`cmake-generator-expressions(7)`
+manual for available expressions. However, :generator:`Xcode`
+does not support per-config per-source settings, so expressions
+that depend on the build configuration are not allowed with that
+generator.
+
+Generator expressions should be preferred instead of setting the alternative per-configuration
+property.
diff --git a/Help/release/dev/src-COMPILE_DEFINITIONS-genex.rst b/Help/release/dev/src-COMPILE_DEFINITIONS-genex.rst
new file mode 100644
index 0000000..892344f
--- /dev/null
+++ b/Help/release/dev/src-COMPILE_DEFINITIONS-genex.rst
@@ -0,0 +1,5 @@
+src-COMPILE_DEFINITIONS-genex
+-----------------------------
+
+* The :prop_sf:`COMPILE_DEFINITIONS` source file property learned to support
+ :manual:`generator expressions <cmake-generator-expressions(7)>`.