be81cf60a3bdfe6710aaf3f5d4794a67afe00cd2
[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 sets additional compiler flags used to build
7 source files.  Use :prop_sf:`COMPILE_DEFINITIONS` to pass additional
8 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.