W3cubDocs

/CMake 3.19

UNITY_BUILD_CODE_AFTER_INCLUDE

New in version 3.16.

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

set(after [[
#if defined(NOMINMAX)
#undef NOMINMAX
#endif
]])
set_target_properties(myTarget PROPERTIES
  UNITY_BUILD_CODE_AFTER_INCLUDE "${after}"
)

See also UNITY_BUILD_CODE_BEFORE_INCLUDE.

© 2000–2020 Kitware, Inc. and Contributors
Licensed under the BSD 3-clause License.
https://cmake.org/cmake/help/v3.19/prop_tgt/UNITY_BUILD_CODE_AFTER_INCLUDE.html