Skip to content

Commit

Permalink
CMake better cache variable properties options for sanitizers
Browse files Browse the repository at this point in the history
Makes it easier for CMake GUI interfaces to know this is a variable that
takes in different strings instead of a boolean.
  • Loading branch information
ekilmer committed May 16, 2021
1 parent f92ce00 commit 3212b52
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion cmake/sanitizers.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -76,7 +76,8 @@ endmacro()
macro(process_sanitizer prefix)

# Add options for the project to use sanitizers
option(${prefix}_USE_SANITIZER "Enable building with sanitizer support. Options are: Address, HWAddress, Memory, MemoryWithOrigins, Undefined, Thread, DataFlow, Leak, 'Address,Undefined'" false)
set(${prefix}_USE_SANITIZER "false" CACHE STRING "Enable building with sanitizer support.")
set_property(CACHE ${prefix}_USE_SANITIZER PROPERTY STRINGS Address HWAddress Memory MemoryWithOrigins Undefined Thread DataFlow Leak "Address,Undefined")
if (UNIX)
option(${prefix}_OPTIMIZE_SANITIZED_BUILDS "Optimize builds that use sanitization" false)
option(${prefix}_BLACKLIST_FILE "Path to blacklist file for sanitizers" "")
Expand Down

0 comments on commit 3212b52

Please sign in to comment.