diff --git a/.github/workflows/windows.yml b/.github/workflows/windows.yml index d906752a0..0ac496124 100644 --- a/.github/workflows/windows.yml +++ b/.github/workflows/windows.yml @@ -217,8 +217,10 @@ jobs: uses: lukka/get-cmake@fffaaafeea488556c2c12dad60690008bc1caacb # v4.4.2 with: cmakeVersion: 4.3.4 + # CMAKE_CXX_FLAGS replaces CMake's MSVC defaults (which include /EHsc), and + # ci_module_cpp20 forwards it to the module build, so list /EHsc explicitly - name: Run CMake (Debug) - run: cmake -S . -B build -G "Visual Studio 17 2022" -DJSON_CI=ON -DCMAKE_CXX_FLAGS="/permissive- /std:c++latest /utf-8 /W4 /WX" + run: cmake -S . -B build -G "Visual Studio 17 2022" -DJSON_CI=ON -DCMAKE_CXX_FLAGS="/permissive- /std:c++latest /utf-8 /EHsc /W4 /WX" - name: Build run: cmake --build build --config Debug --target ci_module_cpp20 \ No newline at end of file