From 10d7776fb2ab1e3f646035a4deb6b79b211193f0 Mon Sep 17 00:00:00 2001 From: jadebenn Date: Tue, 30 Jan 2024 19:33:59 -0600 Subject: [PATCH] trying more variations on the flags --- CMakeLists.txt | 3 +++ CMakePresets.json | 6 +++--- 2 files changed, 6 insertions(+), 3 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index f64bfb36..1b6a775e 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -68,6 +68,9 @@ if(UNIX) endif() 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") elseif(WIN32) add_compile_definitions(_CRT_SECURE_NO_WARNINGS) endif() diff --git a/CMakePresets.json b/CMakePresets.json index c2d19788..f4163dc2 100644 --- a/CMakePresets.json +++ b/CMakePresets.json @@ -34,9 +34,9 @@ "architecture": { "value": "x64" }, - "cacheVariables": { - "COMPILE_OPTIONS": "/permissive-;/Zc:inline;/wd4267;/utf-8", - "CMAKE_BUILD_TYPE": "RelWithDebInfo" + "cacheVariables": { + "CMAKE_BUILD_TYPE": "RelWithDebInfo", + "COMPILE_OPTIONS": "/permissive-;/Zc:inline" } }, {