Repository navigation
Conversation
This branch has not been deployed
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.
Description
The library and ordinary examples are C, but
project(... LANGUAGES C CXX)requires a working C++ compiler even withWITH_TESTS=OFF. For example, configuration fails on master with:cmake -S . -B build-c-only -DWITH_TESTS=OFF \ -DCMAKE_CXX_COMPILER=/nonexistent/cxxEnable CXX only for the optional test suite or CMake older than 3.12. The older-CMake exception preserves the existing minimum version: GenerateExportHeader gained C-project support in CMake 3.12.
Add a standalone regression project that forces an unavailable C++ compiler, builds libcbor and its examples, checks that CXX was not enabled, and runs the existing C linkage consumer. Run it from the existing CircleCI linkage-test command. Document the C++ requirement and add a changelog entry.
Validation
Tested on Linux with GCC/G++ 14.2.0:
CMake 3.5, exact 3.12, Windows/macOS, sanitizers, documentation generation, lint tools, and the full CI matrix were not run locally.
Checklist
No public API or runtime C implementation changes, new platform-specific code, or intended security/performance changes.
Developed with AI assistance; the patch was independently reviewed and tested locally.