diff options
author | Craig Scott <craig.scott@crascit.com> | 2019-11-09 08:48:34 (GMT) |
---|---|---|
committer | Craig Scott <craig.scott@crascit.com> | 2019-11-09 08:48:34 (GMT) |
commit | fcacd8ce8d8843922bd2779f1774425433dfd9cc (patch) | |
tree | 9e169d8c78e1e40b5608004631ae035c59b4c547 /Help/prop_tgt/UNITY_BUILD_CODE_BEFORE_INCLUDE.rst | |
parent | 929d7a454c8069bae4dece36838ed0db6b65d9cf (diff) | |
download | CMake-fcacd8ce8d8843922bd2779f1774425433dfd9cc.zip CMake-fcacd8ce8d8843922bd2779f1774425433dfd9cc.tar.gz CMake-fcacd8ce8d8843922bd2779f1774425433dfd9cc.tar.bz2 |
Help: Improve readability and fix inaccuracies in unity build docs
Diffstat (limited to 'Help/prop_tgt/UNITY_BUILD_CODE_BEFORE_INCLUDE.rst')
-rw-r--r-- | Help/prop_tgt/UNITY_BUILD_CODE_BEFORE_INCLUDE.rst | 17 |
1 files changed, 14 insertions, 3 deletions
diff --git a/Help/prop_tgt/UNITY_BUILD_CODE_BEFORE_INCLUDE.rst b/Help/prop_tgt/UNITY_BUILD_CODE_BEFORE_INCLUDE.rst index f335463..7ed6fa1 100644 --- a/Help/prop_tgt/UNITY_BUILD_CODE_BEFORE_INCLUDE.rst +++ b/Help/prop_tgt/UNITY_BUILD_CODE_BEFORE_INCLUDE.rst @@ -2,7 +2,18 @@ UNITY_BUILD_CODE_BEFORE_INCLUDE ------------------------------- Code snippet which is included verbatim by the :prop_tgt:`UNITY_BUILD` -feature just before the `#include` statement of the targeted source -files. +feature just before every ``#include`` statement in the generated unity +source files. For example: -This could be something like `#define NOMINMAX`. +.. 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`. |