From 2239507d3c05cdf07d5d57156de2865021e18e3f Mon Sep 17 00:00:00 2001 From: jadebenn Date: Mon, 29 Jan 2024 06:14:47 -0600 Subject: [PATCH] Add MSVC optimization flags --- CMakeLists.txt | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index 09cbac97..9aac1e9d 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -68,8 +68,8 @@ if(UNIX) set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -std=c99 -O2 -fPIC") elseif(MSVC) - # Skip warning for invalid conversion from size_t to uint32_t for all targets below for now - add_compile_options("/wd4267" "/utf-8") + # 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" "/Zc:inline" "/wd4267" "/utf-8") elseif(WIN32) add_compile_definitions(_CRT_SECURE_NO_WARNINGS) endif()