From 0f4b92c1e43e3416fc7d39ca83df535694a7ce1e Mon Sep 17 00:00:00 2001 From: halx99 Date: Sat, 4 Dec 2021 13:45:25 +0800 Subject: [PATCH] Always enable string pooling for msvc --- cmake/Modules/CocosConfigDefine.cmake | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/cmake/Modules/CocosConfigDefine.cmake b/cmake/Modules/CocosConfigDefine.cmake index 92fe21c24e..81b5df5e59 100644 --- a/cmake/Modules/CocosConfigDefine.cmake +++ b/cmake/Modules/CocosConfigDefine.cmake @@ -83,6 +83,10 @@ set(CMAKE_CXX_STANDARD ${CXX_STD}) set(CMAKE_CXX_STANDARD_REQUIRED ON) set(CMAKE_CXX_EXTENSIONS OFF) +if (MSVC) + add_compile_options(/GF) +endif() + set(CMAKE_DEBUG_POSTFIX "" CACHE STRING "Library postfix for debug builds. Normally left blank." FORCE) # check visual studio version