summaryrefslogtreecommitdiffstats
path: root/Help/command
diff options
context:
space:
mode:
authorBrad King <brad.king@kitware.com>2014-10-29 19:24:03 (GMT)
committerBrad King <brad.king@kitware.com>2014-10-29 19:24:03 (GMT)
commit8f018673401d3ce8a7d9b587caec9fdf244917b7 (patch)
treeec5df163036fd7844ada28d76b2ee55647b76e51 /Help/command
parent1e48ea7ab80c0d90b4c7681aceb0cd0a56c7af49 (diff)
parent352cbb6e360eccca050aebdc77868558821564af (diff)
downloadCMake-8f018673401d3ce8a7d9b587caec9fdf244917b7.zip
CMake-8f018673401d3ce8a7d9b587caec9fdf244917b7.tar.gz
CMake-8f018673401d3ce8a7d9b587caec9fdf244917b7.tar.bz2
Merge branch 'doc-add_compile_options' into release
Diffstat (limited to 'Help/command')
-rw-r--r--Help/command/add_compile_options.rst15
-rw-r--r--Help/command/add_definitions.rst10
2 files changed, 14 insertions, 11 deletions
diff --git a/Help/command/add_compile_options.rst b/Help/command/add_compile_options.rst
index 214f4be..3fe2a33 100644
--- a/Help/command/add_compile_options.rst
+++ b/Help/command/add_compile_options.rst
@@ -7,15 +7,16 @@ Adds options to the compilation of source files.
add_compile_options(<option> ...)
-Adds options to the compiler command line for sources in the current
-directory and below. This command can be used to add any options, but
-alternative commands exist to add preprocessor definitions
-(:command:`target_compile_definitions` and :command:`add_definitions`) or
-include directories (:command:`target_include_directories` and
-:command:`include_directories`). See documentation of the
-:prop_tgt:`directory <COMPILE_OPTIONS>` and
+Adds options to the compiler command line for targets in the current
+directory and below that are added after this command is invoked.
+See documentation of the :prop_dir:`directory <COMPILE_OPTIONS>` and
:prop_tgt:`target <COMPILE_OPTIONS>` ``COMPILE_OPTIONS`` properties.
+This command can be used to add any options, but alternative commands
+exist to add preprocessor definitions (:command:`target_compile_definitions`
+and :command:`add_definitions`) or include directories
+(:command:`target_include_directories` and :command:`include_directories`).
+
Arguments to ``add_compile_options`` may use "generator expressions" with
the syntax ``$<...>``. See the :manual:`cmake-generator-expressions(7)`
manual for available expressions. See the :manual:`cmake-buildsystem(7)`
diff --git a/Help/command/add_definitions.rst b/Help/command/add_definitions.rst
index 2965c37..a04faf5 100644
--- a/Help/command/add_definitions.rst
+++ b/Help/command/add_definitions.rst
@@ -7,10 +7,12 @@ Adds -D define flags to the compilation of source files.
add_definitions(-DFOO -DBAR ...)
-Adds definitions to the compiler command line for sources in the current
-directory and below. This command can be used to add any flags, but
-it is intended to add preprocessor definitions. Flags
-beginning in -D or /D that look like preprocessor definitions are
+Adds definitions to the compiler command line for targets in the current
+directory and below (whether added before or after this command is invoked).
+This command can be used to add any flags, but it is intended to add
+preprocessor definitions (see the :command:`add_compile_options` command
+to add other flags).
+Flags beginning in -D or /D that look like preprocessor definitions are
automatically added to the :prop_dir:`COMPILE_DEFINITIONS` directory
property for the current directory. Definitions with non-trivial values
may be left in the set of flags instead of being converted for reasons of