summaryrefslogtreecommitdiffstats
path: root/Help/command/add_compile_options.rst
blob: a9329f4aa4af7d884a2ba0555710574dc4b421d9 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
add_compile_options
-------------------

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 or include
directories.  See documentation of the directory and target
COMPILE_OPTIONS properties for details.  Arguments to
add_compile_options may use "generator expressions" with the syntax
"$<...>".  See the :manual:`cmake-generator-expressions(7)` manual for
available expressions.