UNITY_BUILD_CODE_BEFORE_INCLUDE — CMake 4.0.3-dirty Documentation

# UNITY_BUILD_CODE_BEFORE_INCLUDE

Added in version 3.16.

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

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

See also `UNITY_BUILD_CODE_AFTER_INCLUDE`.