From 25430cf68b10a7f2728f583bf653a7e83bc1d203 Mon Sep 17 00:00:00 2001 From: Nana Sakisaka <1901813+saki7@users.noreply.github.com> Date: Mon, 9 Mar 2026 21:15:00 +0900 Subject: [PATCH 1/2] Optimize Windows build flags --- CMakeLists.txt | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/CMakeLists.txt b/CMakeLists.txt index fcd3dea..1e8a86f 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -113,6 +113,13 @@ unset(IRIS_CXX_FEATURE_BEFORE_LATEST) # ----------------------------------------------------------------- # Advanced compile/link settings +if(WIN32) + target_compile_definitions( + _iris_cxx_common + INTERFACE NOMINMAX WIN32_LEAN_AND_MEAN + ) +endif() + if(MSVC) # Don't set too strict flags for testing! They must go to `iris_cxx_test`. # ABI-dependent configurations MUST be set here. From 4cbc795dee5f472a452115a0338c8c6038aa12e3 Mon Sep 17 00:00:00 2001 From: Nana Sakisaka <1901813+saki7@users.noreply.github.com> Date: Mon, 9 Mar 2026 21:20:11 +0900 Subject: [PATCH 2/2] Add `/Zc:__cplusplus` --- CMakeLists.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index 1e8a86f..673d6cb 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -130,7 +130,7 @@ if(MSVC) target_compile_options( _iris_cxx_common INTERFACE - /EHsc /MP /utf-8 /Zc:preprocessor /permissive- + /EHsc /MP /utf-8 /Zc:__cplusplus /Zc:preprocessor /permissive- # $<$:/fsanitize=address> # TODO ) target_link_options(