From 03e824641e9770ee2d5696bfeb728d0325903f09 Mon Sep 17 00:00:00 2001 From: Serge Gautherie Date: Tue, 8 Sep 2020 04:28:50 +0200 Subject: [PATCH] [CMAKE] winetests/: Move '/wd4101' to kernel32/ only Also add matching remove_target_compile_option(). Addendum to 42d2d5e. --- modules/rostests/winetests/CMakeLists.txt | 1 - modules/rostests/winetests/kernel32/CMakeLists.txt | 6 ++++++ 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/modules/rostests/winetests/CMakeLists.txt b/modules/rostests/winetests/CMakeLists.txt index e9a5b33613b..e7b69326de4 100644 --- a/modules/rostests/winetests/CMakeLists.txt +++ b/modules/rostests/winetests/CMakeLists.txt @@ -10,7 +10,6 @@ if(MSVC) /wd4305) # C4305: '=': truncation from 'double' to 'FLOAT' if(ARCH STREQUAL "amd64") add_compile_options( - /wd4101 # C4101: 'x': unreferenced local variable /wd4312 # C4312: 'type cast': conversion from 'unsigned int' to 'char *' of greater size /wd4334) # C4334: '<<': result of 32-bit shift implicitly converted to 64 bits (was 64-bit shift intended?) endif() diff --git a/modules/rostests/winetests/kernel32/CMakeLists.txt b/modules/rostests/winetests/kernel32/CMakeLists.txt index c46d3fdf669..44c24f653fb 100644 --- a/modules/rostests/winetests/kernel32/CMakeLists.txt +++ b/modules/rostests/winetests/kernel32/CMakeLists.txt @@ -48,6 +48,12 @@ add_executable(kernel32_winetest if(MSVC) # Disable warning C4477 (printf format warnings) remove_target_compile_option(kernel32_winetest "/we4477") + + if(ARCH STREQUAL "amd64") + # error C4101: 'is_wow64': unreferenced local variable + remove_target_compile_option(kernel32_winetest "/we4101") + target_compile_options(kernel32_winetest PRIVATE /wd4101) + endif() endif() if(USE_CLANG_CL OR (NOT MSVC))