summaryrefslogtreecommitdiff
path: root/share/cmake-3.17/Help/prop_tgt/UNITY_BUILD_CODE_BEFORE_INCLUDE.rst
blob: 7ed6fa10aafeab06950cc1aacdc5933e1a8ff00e (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
UNITY_BUILD_CODE_BEFORE_INCLUDE
-------------------------------

Code snippet which is included verbatim by the :prop_tgt:`UNITY_BUILD`
feature just before every ``#include`` statement in the generated unity
source files.  For example:

.. code-block:: cmake

  set(before [[
  #if !defined(NOMINMAX)
  #define NOMINMAX
  #endif
  ]])
  set_target_properties(myTarget PROPERTIES
    UNITY_BUILD_CODE_BEFORE_INCLUDE "${before}"
  )

See also :prop_tgt:`UNITY_BUILD_CODE_AFTER_INCLUDE`.