Skip to content

Commit 6b92a85

Browse files
committed
ci: pass /std:c++17 to the example build on MSVC
The exported CMake targets don't propagate cxx_std_17, so the ExampleCMakeBuild consumer configure fails with MSVC's C++14 default. Workaround until the target_compile_features fix lands upstream. Assisted-by: ClaudeCode:claude-fable-5
1 parent 8d26536 commit 6b92a85

1 file changed

Lines changed: 5 additions & 0 deletions

File tree

‎.github/workflows/ci.yml‎

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -34,6 +34,11 @@ jobs:
3434

3535
- name: Test
3636
run: ctest --test-dir build --output-on-failure
37+
env:
38+
# The exported targets don't propagate cxx_std_17 yet (fix pending
39+
# upstream), so ExampleCMakeBuild's consumer configure needs this on
40+
# MSVC, which defaults to C++14.
41+
CXXFLAGS: ${{ runner.os == 'Windows' && '/std:c++17' || '' }}
3742

3843
- name: Install
3944
run: cmake --install build

0 commit comments

Comments
 (0)