From 570260de61d2caf0e128db4057e9c24634d737e4 Mon Sep 17 00:00:00 2001 From: Rangi Date: Fri, 20 Nov 2026 22:34:00 -0500 Subject: [PATCH 1/2] CMake 4.5 C++ module scanning breaks with libstdc++, so `set(CMAKE_CXX_SCAN_FOR_MODULES OFF)` --- CMakeLists.txt | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/CMakeLists.txt b/CMakeLists.txt index 4be14cb0a..59389c535 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -177,6 +177,10 @@ include_directories("include") set(CMAKE_CXX_STANDARD 20) set(CMAKE_CXX_STANDARD_REQUIRED ON) +# CMake 4.5 C++ module scanning breaks with libstdc++. +# https://gitlab.kitware.com/cmake/cmake/-/work_items/28313 +set(CMAKE_CXX_SCAN_FOR_MODULES OFF) + if(MSVC) add_compile_options( /wd5030 # Warning C5030 is about unknown attributes (`[[gnu::ATTR]]`), none of ours being load-bearing. From b1a31382707f6ec6039576f3bb4841a52b504bf4 Mon Sep 17 00:00:00 2001 From: Rangi Date: Fri, 20 Nov 2026 22:35:10 -0500 Subject: [PATCH 2/2] Replace `add_definitions(/D_CRT_SECURE_NO_WARNINGS)` with `add_compile_definitions(_CRT_SECURE_NO_WARNINGS)` --- CMakeLists.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index 59389c535..72781765d 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -187,7 +187,7 @@ if(MSVC) /wd4996 # Warning C4996 is about using POSIX names, which we want to do for portability. /Zc:preprocessor # Opt into the C++20-conformant preprocessor. ) - add_definitions(/D_CRT_SECURE_NO_WARNINGS) + add_compile_definitions(_CRT_SECURE_NO_WARNINGS) else() add_compile_options(-Wall -pedantic -Wno-unknown-warning-option -fno-exceptions -fno-rtti)