Imported Upstream version 3.11.2
[platform/upstream/cmake.git] / Help / prop_sf / COMPILE_FLAGS.rst
1 COMPILE_FLAGS
2 -------------
3
4 Additional flags to be added when compiling this source file.
5
6 The ``COMPILE_FLAGS`` property, managed as a string, sets additional compiler
7 flags used to build source files.  Use :prop_sf:`COMPILE_DEFINITIONS` to pass
8 additional preprocessor definitions.
9
10 Contents of ``COMPILE_FLAGS`` may use "generator expressions"
11 with the syntax ``$<...>``.  See the :manual:`cmake-generator-expressions(7)`
12 manual for available expressions.  However, :generator:`Xcode`
13 does not support per-config per-source settings, so expressions
14 that depend on the build configuration are not allowed with that
15 generator.
16
17 .. note::
18
19   This property has been superseded by the :prop_sf:`COMPILE_OPTIONS` property.