diff options
author | Brad King <brad.king@kitware.com> | 2018-03-21 13:08:48 (GMT) |
---|---|---|
committer | Kitware Robot <kwrobot@kitware.com> | 2018-03-21 13:08:58 (GMT) |
commit | 54ae5ee1d3d52ed685a707e1bcab64b0d93d070f (patch) | |
tree | 5a5cd050f561dcb777a42363dc4b65e04ca6f8ec /Help | |
parent | 87223a24f061c519caf72df63e61be9676e322ea (diff) | |
parent | 3af1daa186f01f1538cf9a7541e9269ac0c6e95a (diff) | |
download | CMake-54ae5ee1d3d52ed685a707e1bcab64b0d93d070f.zip CMake-54ae5ee1d3d52ed685a707e1bcab64b0d93d070f.tar.gz CMake-54ae5ee1d3d52ed685a707e1bcab64b0d93d070f.tar.bz2 |
Merge topic 'pr.target_compile_definitions'
3af1daa186 Help: Document target_compile_definitions handling of -D
Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !1873
Diffstat (limited to 'Help')
-rw-r--r-- | Help/command/target_compile_definitions.rst | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/Help/command/target_compile_definitions.rst b/Help/command/target_compile_definitions.rst index 3709e7a..a740117 100644 --- a/Help/command/target_compile_definitions.rst +++ b/Help/command/target_compile_definitions.rst @@ -27,3 +27,13 @@ Arguments to ``target_compile_definitions`` may use "generator expressions" with the syntax ``$<...>``. See the :manual:`cmake-generator-expressions(7)` manual for available expressions. See the :manual:`cmake-buildsystem(7)` manual for more on defining buildsystem properties. + +Any leading ``-D`` on an item will be removed. Empty items are ignored. +For example, the following are all equivalent: + +.. code-block:: cmake + + target_compile_definitions(foo PUBLIC FOO) + target_compile_definitions(foo PUBLIC -DFOO) # -D removed + target_compile_definitions(foo PUBLIC "" FOO) # "" ignored + target_compile_definitions(foo PUBLIC -D FOO) # -D becomes "", then ignored |