Skip to content

Conversation

@carsonRadtke
Copy link
Member

This change uses a cmake presets file in an effort allow for agentic AI to better switch between project settings. It replaces the old CMakeSettings.json for the more flexible CMakePresets.json.

@carsonRadtke carsonRadtke marked this pull request as ready for review September 30, 2025 17:45
@carsonRadtke carsonRadtke self-assigned this Sep 30, 2025
@carsonRadtke carsonRadtke added Type: Enhancement Suggests an improvement or new feature Type: Infra Changes to build system, tests, or pipelines labels Sep 30, 2025
@carsonRadtke carsonRadtke moved this from Open to Ready for Review in Microsoft/GSL Pull Requests In-Flight Sep 30, 2025
@carsonRadtke carsonRadtke force-pushed the carsonradtke/add-cmake-presets branch from 9cee3da to b14edaa Compare October 1, 2025 16:06
@carsonRadtke
Copy link
Member Author

@copilot Can you update the GitHub Actions to make use of the presets?

Copy link
Contributor

Copilot AI commented Nov 3, 2025

@carsonRadtke I've opened a new pull request, #1223, to work on those changes. Once the pull request is ready, I'll request review from you.

carsonRadtke and others added 3 commits December 4, 2025 16:44
This change uses a cmake presets file in an effort allow for agentic AI
to better switch between project settings. It replaces the old
CMakeSettings.json for the more flexible CMakePresets.json.
* Initial plan

* Update GitHub Actions to use CMake presets for compilers workflow

Co-authored-by: carsonRadtke <10507970+carsonRadtke@users.noreply.github.com>

---------

Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com>
Co-authored-by: carsonRadtke <10507970+carsonRadtke@users.noreply.github.com>
Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR modernizes the build configuration by migrating from the Visual Studio-specific CMakeSettings.json to the more standardized and flexible CMakePresets.json format. This change improves cross-platform and cross-IDE support, particularly for agentic AI tooling that can now more easily switch between different build configurations.

Key Changes

  • Introduces comprehensive CMakePresets.json with 24 configure presets covering all combinations of compilers (MSVC, GCC, Clang), C++ standards (14, 17, 20, 23), and build types (Debug, Release)
  • Updates GitHub Actions workflows to use CMake presets instead of manual parameter passing
  • Simplifies the cmake composite action by consolidating parameters into a single preset identifier

Reviewed changes

Copilot reviewed 5 out of 5 changed files in this pull request and generated 5 comments.

Show a summary per file
File Description
CMakeSettings.json Removed legacy Visual Studio CMake settings file
CMakePresets.json Added comprehensive preset definitions for all supported compiler/standard/build type combinations with proper inheritance hierarchy
.github/workflows/copilot-setup-steps.yml Updated to use clang presets for C++14 and C++20 builds
.github/workflows/compilers.yml Simplified workflow by replacing multiple parameters with preset names for gcc, clang, xcode, and MSVC jobs
.github/workflows/cmake/action.yml Streamlined action inputs to use single preset parameter instead of multiple build configuration parameters

@github-project-automation github-project-automation bot moved this from Ready for Review to Approved in Microsoft/GSL Pull Requests In-Flight Dec 5, 2025
@carsonRadtke carsonRadtke merged commit c31617f into main Dec 5, 2025
90 checks passed
@carsonRadtke carsonRadtke deleted the carsonradtke/add-cmake-presets branch December 8, 2025 17:41
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Status: Review Needed Needs review from GSL maintainers Type: Enhancement Suggests an improvement or new feature Type: Infra Changes to build system, tests, or pipelines

Projects

Development

Successfully merging this pull request may close these issues.

3 participants