diff --git a/CMakeLists.txt b/CMakeLists.txt index 4be14cb0a..72781765d 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -177,13 +177,17 @@ 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. /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)