From e4e690f782cdf14e51bfc8ab5e54b61d74fb26d2 Mon Sep 17 00:00:00 2001 From: ohyzha Date: Tue, 28 Jan 2025 16:08:18 +0200 Subject: [PATCH] suppress unknown pragma warnings for MSVC --- cmake/functions/SetCompilerSettings.cmake | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/cmake/functions/SetCompilerSettings.cmake b/cmake/functions/SetCompilerSettings.cmake index 71ffee4..0ec6284 100644 --- a/cmake/functions/SetCompilerSettings.cmake +++ b/cmake/functions/SetCompilerSettings.cmake @@ -24,8 +24,7 @@ function(SetWarningSettings TARGET) elseif (WIN32) if (MSVC) add_definitions(-D_CRT_SECURE_NO_WARNINGS) - add_compile_options(/wd4068) - set_target_properties(${TARGET} PROPERTIES COMPILE_FLAGS "/wd4068") + target_compile_options(${TARGET} PRIVATE "/wd4068;") set_target_properties(${TARGET} PROPERTIES COMPILE_FLAGS "/we4715") set_target_properties(${TARGET} PROPERTIES LINK_FLAGS "/ignore:4099") endif()