diff --git a/src/mono/mono/component/debugger-protocol.h b/src/mono/mono/component/debugger-protocol.h index 32cceb72ce4c99..d7f19e3fb9247d 100644 --- a/src/mono/mono/component/debugger-protocol.h +++ b/src/mono/mono/component/debugger-protocol.h @@ -15,7 +15,7 @@ /* * Processor architecture constants for GetSystemInformation command. - * These values must match PROCESSOR_ARCHITECTURE_* from winnt.h — do not change them. + * These values must match PROCESSOR_ARCHITECTURE_* from winnt.h - do not change them. */ #define CYCORDEBUG_PROCESSOR_ARCHITECTURE_INTEL 0 #define CYCORDEBUG_PROCESSOR_ARCHITECTURE_ARM 5 diff --git a/src/native/external/zlib-ng.cmake b/src/native/external/zlib-ng.cmake index 4bef4becf1d734..4116d61a5b3df1 100644 --- a/src/native/external/zlib-ng.cmake +++ b/src/native/external/zlib-ng.cmake @@ -55,8 +55,8 @@ endif() if (MSVC) #zlib-ng sets /utf-8 which clashes with /source-charset:utf-8 that we set centrally - get_directory_property(dirCompileOptions COMPILE_OPTIONS) - string(REPLACE "/source-charset:utf-8" "" dirCompileOptions "${dirCompileOptions}") + get_directory_property(zlibngOriginalCompileOptions COMPILE_OPTIONS) + string(REPLACE "/source-charset:utf-8" "" dirCompileOptions "${zlibngOriginalCompileOptions}") set_directory_properties(PROPERTIES COMPILE_OPTIONS "${dirCompileOptions}") endif() @@ -65,6 +65,11 @@ set(SKIP_INSTALL_ALL ON) FetchContent_MakeAvailable(fetchzlibng) set(SKIP_INSTALL_ALL OFF) +if (MSVC) + set_directory_properties(PROPERTIES COMPILE_OPTIONS "${zlibngOriginalCompileOptions}") + unset(zlibngOriginalCompileOptions) +endif() + set_property(DIRECTORY ${CMAKE_CURRENT_LIST_DIR}/zlib-ng PROPERTY MSVC_WARNING_LEVEL 3) # Set the MSVC warning level for all zlib-ng targets to 3. target_compile_options(zlib PRIVATE $<$:-Wno-unused-command-line-argument>) # Make sure MacOS respects ignoring unused CLI arguments target_compile_options(zlib PRIVATE $<$:-Wno-logical-op-parentheses>) # place parentheses around the '&&' expression to silence this warning