From 2f5df370d5500829aaae06595b24eaf0c5a98fcf Mon Sep 17 00:00:00 2001 From: Bertrand Bellenot Date: Thu, 1 Oct 2026 13:55:08 +0200 Subject: [PATCH] [skip-ci] Fix build in Debug mode on Windows --- builtins/gtest/CMakeLists.txt | 2 +- interpreter/CppInterOp/CMakeLists.txt | 2 +- roottest/root/io/cpp11Containers/CMakeLists.txt | 3 +++ 3 files changed, 5 insertions(+), 2 deletions(-) diff --git a/builtins/gtest/CMakeLists.txt b/builtins/gtest/CMakeLists.txt index ab6c3f3717314..7ab884c1b2c14 100644 --- a/builtins/gtest/CMakeLists.txt +++ b/builtins/gtest/CMakeLists.txt @@ -12,7 +12,7 @@ set(_gtest_byproducts set(GTEST_CXX_FLAGS "${ROOT_EXTERNAL_CXX_FLAGS}") if(MSVC) - if(winrtdebug) + if(winrtdebug) set(GTEST_BUILD_TYPE Debug) else() set(GTEST_BUILD_TYPE Release) diff --git a/interpreter/CppInterOp/CMakeLists.txt b/interpreter/CppInterOp/CMakeLists.txt index e65c162e29d9b..812cab84a86d6 100644 --- a/interpreter/CppInterOp/CMakeLists.txt +++ b/interpreter/CppInterOp/CMakeLists.txt @@ -461,7 +461,7 @@ endif () # Fixes "C++ exception handler used, but unwind semantics are not enabled" warning Windows if (MSVC) - set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} /EHsc") + set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} /EHsc /bigobj") # Required for clang::driver::options::OPT_ see https://github.com/llvm/llvm-project/issues/86028 set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Zc:preprocessor") endif () diff --git a/roottest/root/io/cpp11Containers/CMakeLists.txt b/roottest/root/io/cpp11Containers/CMakeLists.txt index fa266b5090524..69929cc53a2dc 100644 --- a/roottest/root/io/cpp11Containers/CMakeLists.txt +++ b/roottest/root/io/cpp11Containers/CMakeLists.txt @@ -19,6 +19,9 @@ ROOTTEST_GENERATE_EXECUTABLE( LIBRARIES Core RIO Tree TreePlayer Hist GTest::gtest GTest::gtest_main GTest::gmock GTest::gmock_main ROOT::TestSupport FIXTURES_REQUIRED root-io-cpp11Containers-unorderedMapDict-fixture FIXTURES_SETUP root-io-cpp11Containers-unorderedMapUnitTests-fixture) +if(MSVC) + set_source_files_properties(unorderedMapUnitTests.cxx COMPILE_FLAGS /bigobj) +endif() ROOTTEST_ADD_TEST(unorderedMapUnitTests EXEC ${CMAKE_CURRENT_BINARY_DIR}/unorderedMapUnitTests