Update CMake minimum version to 3.15 and fix package configuration#3
Merged
chenpeizhi merged 3 commits intomasterfrom Nov 9, 2025
Merged
Update CMake minimum version to 3.15 and fix package configuration#3chenpeizhi merged 3 commits intomasterfrom
chenpeizhi merged 3 commits intomasterfrom
Conversation
Co-authored-by: chenpeizhi <8114085+chenpeizhi@users.noreply.github.com>
Copilot
AI
changed the title
[WIP] Update minimum cmake version to 3.15 and validate functionality
Update CMake minimum version to 3.15 and fix package configuration
Nov 9, 2025
chenpeizhi
approved these changes
Nov 9, 2025
Contributor
chenpeizhi
left a comment
There was a problem hiding this comment.
Looks good, but we may need to test Drudge after this commit.
Contributor
There was a problem hiding this comment.
Pull Request Overview
This PR modernizes the CMake build system for the libcanon project by updating CMake requirements, simplifying test configuration, and improving package export conventions.
- Bumps minimum CMake version from 3.6 to 3.15
- Simplifies include directory management by leveraging the
headersINTERFACE target - Adds CMake namespace convention (libcanon::) to exported targets
Reviewed Changes
Copilot reviewed 3 out of 3 changed files in this pull request and generated 1 comment.
| File | Description |
|---|---|
| CMakeLists.txt | Updates CMake minimum version to 3.15, enforces C++ standard requirements, adds namespace to export targets, and fixes typo in comment |
| include/CMakeLists.txt | Simplifies include directory paths by removing redundant /libcanon suffix and corrects comment typo |
| test/CMakeLists.txt | Refactors test configuration to use the headers target directly instead of manual include directory specification |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
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.
Updates minimum CMake version from 3.6 to 3.15, eliminating deprecation warnings and applying modern CMake best practices.
Core Changes
cmake_minimum_required(VERSION 3.15)in root CMakeLists.txtCMAKE_CXX_STANDARD_REQUIRED ONandCMAKE_CXX_EXTENSIONS OFFfor enforced C++14 compliance and portabilityPackage Export Fixes
libcanontolibcanon::for proper CMake target naming conventionTest Configuration
target_link_libraries(test PRIVATE headers gtest gtest_main)Downstream Usage
Original prompt
💬 We'd love your input! Share your thoughts on Copilot coding agent in our 2 minute survey.