CForgeTargetEnableSanitizers¶
Generate some options the user can toggle to enable sanitized build to a specific target.
- cforge_target_enable_sanitizers¶
cforge_target_enable_sanitizers(<target-name>)
This command generates one option per supported sanitizer for the given target. By default, no sanitizer is enabled (all generated options are set to FALSE).
The options have the following naming:
${CFORGE_PROJECT_PREFIX}_SANITIZE_<target-name>_<sanitizer-name>
.
Known limitations
Sanitizers are currently only supported with GCC and Clang.
Supported sanitizers are
address
,memory
,undefined
,thread
.No check is performed to ensure a given sanitizer is supported by the current toolchain, or compatible with the other sanitizers enabled (could be done with
try_compile()
though).