From bc02c0e937eb7a65a8f533116fb8115f1f30de08 Mon Sep 17 00:00:00 2001 From: ohyzha Date: Mon, 22 Jul 2024 11:05:55 +0300 Subject: [PATCH] disable useless warnings for MSVC --- cmake/SetCompilerSettings.cmake | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/cmake/SetCompilerSettings.cmake b/cmake/SetCompilerSettings.cmake index 19ae152..4fd20bd 100644 --- a/cmake/SetCompilerSettings.cmake +++ b/cmake/SetCompilerSettings.cmake @@ -15,6 +15,11 @@ endfunction() function(SetWarningSettings TARGET) if (LINUX) target_compile_options(${TARGET} PRIVATE -Wall -Wno-unknown-pragmas) + elseif (WIN32) + if (MSVC) + set_target_properties(${TARGET} PROPERTIES COMPILE_FLAGS "/wd4068") + set_target_properties(${TARGET} PROPERTIES LINK_FLAGS "/ignore:4099") + endif() endif() endfunction()