diff --git a/CMakeLists.txt b/CMakeLists.txt index 04ebd431..f64bfb36 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -68,9 +68,6 @@ if(UNIX) endif() 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" "/Zc:inline" "/wd4267" "/utf-8") elseif(WIN32) add_compile_definitions(_CRT_SECURE_NO_WARNINGS) endif() diff --git a/CMakePresets.json b/CMakePresets.json index 2feabc53..104d138c 100644 --- a/CMakePresets.json +++ b/CMakePresets.json @@ -35,6 +35,7 @@ "value": "x64" }, "cacheVariables": { + "COMPILE_OPTIONS": "/O2 /Zc:inline /wd4267 /utf-8", "CMAKE_BUILD_TYPE": "RelWithDebInfo" } },