From ac4fa7462467c0b25887976c5a6ef0001e995a12 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E6=B1=9F=E6=88=98?= <40414978+PatriceJiang@users.noreply.github.com> Date: Mon, 14 Aug 2023 11:40:13 +0800 Subject: [PATCH] Windows: Suppressing the Warning When Linking (#15943) --- native/CMakeLists.txt | 5 +++++ templates/windows/CMakeLists.txt | 2 +- 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/native/CMakeLists.txt b/native/CMakeLists.txt index a1da31bfed..8e0e429644 100644 --- a/native/CMakeLists.txt +++ b/native/CMakeLists.txt @@ -3105,6 +3105,11 @@ if(MSVC) /wd4098 # defaultlib conflicts /wd4099 # PDB 'filename' was not found with 'object/library' or at 'path'; linking object as if no debug info ) + target_link_options(${ENGINE_NAME} PUBLIC + /ignore:4099 # PDB 'filename' was not found with 'object/library' or at 'path'; linking object as if no debug info + /ignore:4098 # defaultlib 'library' conflicts with use of other libs; use /NODEFAULTLIB:library + /ignore:4204 # 'filename' is missing debugging information for referencing module; linking object as if no debug info + ) endif() if(CC_USE_VULKAN) diff --git a/templates/windows/CMakeLists.txt b/templates/windows/CMakeLists.txt index c91dd01ad4..9f3d15f91f 100644 --- a/templates/windows/CMakeLists.txt +++ b/templates/windows/CMakeLists.txt @@ -1,4 +1,4 @@ -cmake_minimum_required(VERSION 3.8) +cmake_minimum_required(VERSION 3.18) set(APP_NAME "CocosGame" CACHE STRING "Project Name") project(${APP_NAME} CXX)