Skip to content

Commit 0abe4b0

Browse files
committed
Improve sanitizer option messaging and consistency in CMake configuration
1 parent db610c4 commit 0abe4b0

1 file changed

Lines changed: 4 additions & 4 deletions

File tree

CMakeLists.txt

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -70,7 +70,7 @@ option(MZ_BUILD_FUZZ_TESTS "Builds minizip fuzzer executables" OFF)
7070
option(MZ_CODE_COVERAGE "Builds with code coverage flags" OFF)
7171
# Multi-choice code sanitizer option
7272
set(MZ_SANITIZER_FLAVORS "memory" "address" "undefined" "thread")
73-
set(MZ_SANITIZER "none" CACHE STRING "Enable sanitizer support")
73+
set(MZ_SANITIZER "none" CACHE STRING "Enable Sanitizer support")
7474
set_property(CACHE MZ_SANITIZER PROPERTY STRINGS "${MZ_SANITIZER_FLAVORS}")
7575

7676
# Backwards compatibility
@@ -705,11 +705,11 @@ if(MZ_SANITIZER_LOWER IN_LIST MZ_SANITIZER_FLAVORS)
705705
endif()
706706
if(NOT MZ_STATUS)
707707
set(MZ_SANITIZER_ENABLED OFF)
708-
message(FATAL_ERROR "Cannot enable the Address Sanitizer '${MZ_SANITIZER}' option")
708+
message(FATAL_ERROR "Cannot enable Sanitizer")
709709
endif()
710710
elseif(MZ_SANITIZER_LOWER STREQUAL "none")
711711
set(MZ_SANITIZER_ENABLED OFF)
712-
message(STATUS " Address Sanitizer not enabled")
712+
message(STATUS " Sanitizer not enabled")
713713
else()
714714
message(FATAL_ERROR "Unknown MZ_SANITIZER option: '${MZ_SANITIZER}'\n"
715715
"MZ_SANITIZER must be one of '${MZ_SANITIZER_FLAVORS}'")
@@ -1097,6 +1097,6 @@ add_feature_info(MZ_BUILD_TESTS MZ_BUILD_TESTS "Builds minizip test executable")
10971097
add_feature_info(MZ_BUILD_UNIT_TESTS MZ_BUILD_UNIT_TESTS "Builds minizip unit test project")
10981098
add_feature_info(MZ_BUILD_FUZZ_TESTS MZ_BUILD_FUZZ_TESTS "Builds minizip fuzzer executables")
10991099
add_feature_info(MZ_CODE_COVERAGE MZ_CODE_COVERAGE "Builds with code coverage flags")
1100-
add_feature_info(MZ_SANITIZER MZ_SANITIZER_ENABLED "Builds with Address Sanitizer")
1100+
add_feature_info(MZ_SANITIZER MZ_SANITIZER_ENABLED "Builds with Sanitizer Support")
11011101

11021102
feature_summary(WHAT ENABLED_FEATURES DISABLED_FEATURES INCLUDE_QUIET_PACKAGES)

0 commit comments

Comments
 (0)