From 554a960785beee4f95afa81439427f2413c7e979 Mon Sep 17 00:00:00 2001 From: jadebenn Date: Mon, 29 Jan 2024 21:28:23 -0600 Subject: [PATCH] add ltcg flag to msvc --- CMakeLists.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index 015c3e0c4..b8c68e7b0 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -69,7 +69,7 @@ if(UNIX) set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -std=c99 -O2 -fPIC") elseif(MSVC) # Set MSVC-specific optimization flags and skip warning for invalid conversion from size_t to uint32_t for all targets below - add_compile_options("/O2" "/Oi" "/GL" "/Zc:inline" "/permissive-" "/wd4267" "/utf-8") + add_compile_options("/O2" "/Oi" "/GL" "/LTCG" "/Zc:inline" "/permissive-" "/wd4267" "/utf-8") elseif(WIN32) add_compile_definitions(_CRT_SECURE_NO_WARNINGS) endif()