Repository navigation
Fix Windows CI build failure and improve build speed - #404
Merged
Merged
Conversation
- Add _CRT_SECURE_NO_WARNINGS to cbor_project_options INTERFACE library so examples/tests don't fail with C4996 errors from /sdl (sscanf, freopen, fopen) - Restrict LTO to Release builds only (CMAKE_INTERPROCEDURAL_OPTIMIZATION_RELEASE) to avoid unnecessary LTCG overhead in Debug - Add --parallel to cmake --build on Windows CI Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## master #404 +/- ##
===========================================
+ Coverage 99.87% 100.00% +0.12%
===========================================
Files 20 20
Lines 1663 1663
===========================================
+ Hits 1661 1663 +2
+ Misses 2 0 -2 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
PJK
added a commit
that referenced
this pull request
Feb 15, 2026
* Fix Windows CI build failure and improve build speed - Add _CRT_SECURE_NO_WARNINGS to cbor_project_options INTERFACE library so examples/tests don't fail with C4996 errors from /sdl (sscanf, freopen, fopen) - Restrict LTO to Release builds only (CMAKE_INTERPROCEDURAL_OPTIMIZATION_RELEASE) to avoid unnecessary LTCG overhead in Debug - Add --parallel to cmake --build on Windows CI Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com> * Link PR #404 in changelog Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com> * Add Windows Defender exclusion to speed up Windows CI Add-MpExclusion for the project directory to prevent real-time scanning overhead during cmake configure and build steps. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com> * Try multiple approaches to disable Defender (best-effort) Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com> * Cache cmocka build on Windows CI The cmocka configure step takes ~206s on MSVC due to each check_function_exists call spawning cl.exe with high startup overhead. Cache the build so it's only paid once. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com> * Switch Windows CI to Ninja generator Use Ninja instead of VS generator to speed up configure (no .vcxproj generation, faster trial compilations) and build steps. Uses vswhere to locate vcvarsall.bat, writes batch scripts from bash to avoid quoting issues across shells. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com> * Escape heredoc << for CircleCI v2.1 config parser Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com> * Remove accidentally committed build artifacts and local files Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com> --------- Co-authored-by: Claude Opus 4.6 <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
_CRT_SECURE_NO_WARNINGSto thecbor_project_optionsINTERFACE library so examples and tests don't fail with MSVC C4996 errors when/sdlis active (sscanf,freopen,fopenusages in examples)CMAKE_INTERPROCEDURAL_OPTIMIZATION_RELEASEinstead ofCMAKE_INTERPROCEDURAL_OPTIMIZATIONto avoid unnecessary LTCG overhead in Debug builds--paralleltocmake --buildcommandsContext
The Windows CI failure was introduced in #402 when
add_definitions(-D_CRT_SECURE_NO_WARNINGS)(global) was replaced withtarget_compile_definitions(cbor PRIVATE _CRT_SECURE_NO_WARNINGS)(library-only). The/sdlflag fromcbor_project_optionsturns C4996 deprecation warnings into errors for example targets that use standard CRT functions.Test plan
build-and-test-win) passes🤖 Generated with Claude Code