Skip to content

build: add explicit gcc cmake presets for linux#1663

Open
achintya2k5 wants to merge 1 commit into
hiero-ledger:mainfrom
achintya2k5:build/explicit-gcc-presets
Open

build: add explicit gcc cmake presets for linux#1663
achintya2k5 wants to merge 1 commit into
hiero-ledger:mainfrom
achintya2k5:build/explicit-gcc-presets

Conversation

@achintya2k5

@achintya2k5 achintya2k5 commented May 22, 2026

Copy link
Copy Markdown
Contributor

Description:
Introduces explicit CMake presets for GCC on Linux to improve CI clarity and toolchain robustness, while maintaining standard aliases for local development friction.

  • Add linux-x64-gcc-debug and linux-x64-gcc-release explicit CMake configure and build presets
  • Modify linux-x64-debug and linux-x64-release to act as thin aliases inheriting from the explicit GCC presets
  • Update CI workflow matrix in zxc-build-library.yaml to use linux-x64-gcc-* so logs explicitly advertise the compiler
  • Update README.md build instructions to clarify GCC defaults and document explicit alternatives

Related issue(s):

Fixes #1621

Notes for reviewer:
Tested locally: both the explicit linux-x64-gcc-* and alias linux-x64-* presets successfully configure and build the project via vcpkg and ninja. CI matrices will now explicitly show the GCC compiler being exercised to prepare for future toolchain additions (e.g., Clang).

Note regarding CLAUDE.md: The original issue mentioned updating CLAUDE.md, but I omitted that from this PR as the file does not currently exist in the repository.

Checklist

  • Documented (Code comments, README, etc.)
  • Tested (unit, integration, etc.)

Summary by CodeRabbit

  • Chores

    • Updated Linux build configuration to explicitly use GCC compiler with updated preset names and inheritance structure.
  • Documentation

    • Updated build instructions to clarify recommended Linux presets and specify GCC as the default compiler for Linux builds.

Review Change Stack

@achintya2k5 achintya2k5 requested review from a team as code owners May 22, 2026 19:16
@coderabbitai

coderabbitai Bot commented May 22, 2026

Copy link
Copy Markdown

Warning

Rate limit exceeded

@achintya2k5 has exceeded the limit for the number of commits that can be reviewed per hour. Please wait 51 minutes and 48 seconds before requesting another review.

You’ve run out of usage credits. Purchase more in the billing tab.

⌛ How to resolve this issue?

After the wait time has elapsed, a review can be triggered using the @coderabbitai review command as a PR comment. Alternatively, push new commits to this PR.

We recommend that you space out your commits to avoid hitting the rate limit.

🚦 How do rate limits work?

CodeRabbit enforces hourly rate limits for each developer per organization.

Our paid plans have higher rate limits than the trial, open-source and free plans. In all cases, we re-allow further reviews after a brief timeout.

Please see our FAQ for further information.

ℹ️ Review info
⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro

Run ID: bdfb09a6-e2e3-4fb7-ba23-deb937073863

📥 Commits

Reviewing files that changed from the base of the PR and between e2abaa6 and ccf8fb1.

📒 Files selected for processing (3)
  • .github/workflows/zxc-build-library.yaml
  • CMakePresets.json
  • README.md
📝 Walkthrough

Walkthrough

CMake presets are refactored to introduce explicit GCC compiler presets (linux-x64-gcc-debug/release) and convert existing linux-x64-* presets into thin aliases inheriting from them. CI workflow and documentation are updated to reference and explain the new structure.

Changes

Linux GCC Preset Refactoring

Layer / File(s) Summary
CMake preset structure: GCC-specific presets and aliases
CMakePresets.json
New linux-x64-gcc-debug and linux-x64-gcc-release configure presets explicitly set GCC compiler and toolchain settings. Existing linux-x64-debug/linux-x64-release configure presets are converted to aliases inheriting from the GCC presets. Parallel changes apply to build presets: new GCC build presets are added, and existing ones inherit from them with updated configurePreset references.
CI workflow reference and user documentation
.github/workflows/zxc-build-library.yaml, README.md
Linux build matrix preset reference changes from linux-x64 to linux-x64-gcc. Documentation note is added to clarify that standard linux-x64-* presets default to GCC, with references to compiler-explicit variants and forthcoming clang alternatives.

Estimated code review effort

🎯 2 (Simple) | ⏱️ ~10 minutes

Poem

🐰 A rabbit hops through preset trees,
Building paths with GCC ease—
Aliases point to home so true,
Linux builds, now fresh and new!
thump thump

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The PR title accurately describes the main change: adding explicit GCC CMake presets for Linux builds.
Linked Issues check ✅ Passed The PR addresses all coding requirements from issue #1621: adds explicit gcc presets, converts existing presets to aliases, updates CI workflow, and updates documentation.
Out of Scope Changes check ✅ Passed All changes directly relate to adding GCC presets and updating related CI/documentation files as specified in issue #1621.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

@github-actions

github-actions Bot commented May 22, 2026

Copy link
Copy Markdown

Hey @achintya2k5 👋 thanks for the PR!
I'm your friendly PR Helper Bot 🤖 and I'll be riding shotgun on this one, keeping track of your PR's status to help you get it approved and merged.

This comment updates automatically as you push changes -- think of it as your PR's live scoreboard!
Here's the latest:


PR Checks

DCO Sign-off -- All commits have valid sign-offs. Nice work!


GPG Signature -- All commits have verified GPG signatures. Locked and loaded!


Merge Conflicts -- No merge conflicts detected. Smooth sailing!


Issue Link -- Linked to #1621 (assigned to you).


🎉 All checks passed! Your PR is ready for review. Great job!

@github-actions github-actions Bot added the status: needs revision The pull request requires changes from the author before it can be reviewed or merged label May 22, 2026
@achintya2k5 achintya2k5 force-pushed the build/explicit-gcc-presets branch from e2abaa6 to 8bdafa7 Compare May 22, 2026 19:21

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Actionable comments posted: 1

🧹 Nitpick comments (1)
README.md (1)

83-90: ⚡ Quick win

Use markdown backticks instead of triple quotes.

The triple quotes ''' are not standard markdown syntax for inline code. Consider using backticks for better rendering and consistency with typical markdown conventions.

♻️ Proposed refactor
-# Note on Linux Presets: The standard '''linux-x64-release'''
-# and '''linux-x64-debug''' presets are the recommended
+# Note on Linux Presets: The standard `linux-x64-release`
+# and `linux-x64-debug` presets are the recommended
 # defaults for local development and will automatically
 # use the GCC Compiler. If you are specifically testing
 # toolchain portability or checking CI matrix
 # coverage, compiler-explicit alternatives are available:
-# '''linux-x64-gcc-release''' / '''linux-x64-gcc-debug'''
-# (with '''clang''' variants forthcoming)
+# `linux-x64-gcc-release` / `linux-x64-gcc-debug`
+# (with `clang` variants forthcoming)
🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@README.md` around lines 83 - 90, Replace the nonstandard triple-quote inline
code markers ('''...''') with Markdown backticks around the preset names so they
render correctly; update occurrences for linux-x64-release, linux-x64-debug,
linux-gcc-release, linux-x64-gcc-debug and the forthcoming clang variants to use
`backticks` instead of triple quotes throughout the README text.
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

Inline comments:
In `@README.md`:
- Line 89: Update the incorrect preset name string 'linux-gcc-release' to
'linux-x64-gcc-release' in the README where the presets list contains "#
'linux-gcc-release' / 'linux-x64-gcc-debug'"; locate that literal and replace it
so both presets consistently include the 'x64' component (e.g.,
'linux-x64-gcc-release' / 'linux-x64-gcc-debug').

---

Nitpick comments:
In `@README.md`:
- Around line 83-90: Replace the nonstandard triple-quote inline code markers
('''...''') with Markdown backticks around the preset names so they render
correctly; update occurrences for linux-x64-release, linux-x64-debug,
linux-gcc-release, linux-x64-gcc-debug and the forthcoming clang variants to use
`backticks` instead of triple quotes throughout the README text.
🪄 Autofix (Beta)

Fix all unresolved CodeRabbit comments on this PR:

  • Push a commit to this branch (recommended)
  • Create a new PR with the fixes

ℹ️ Review info
⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro

Run ID: 06ee0609-7b11-4e07-82f6-c50f9d866896

📥 Commits

Reviewing files that changed from the base of the PR and between a898153 and e2abaa6.

📒 Files selected for processing (3)
  • .github/workflows/zxc-build-library.yaml
  • CMakePresets.json
  • README.md

Comment thread README.md Outdated
@github-actions github-actions Bot added status: needs review The pull request is ready for maintainer review and removed status: needs revision The pull request requires changes from the author before it can be reviewed or merged labels May 22, 2026
Signed-off-by: achintya2k5 <achintyasin@gmail.com>
@achintya2k5 achintya2k5 force-pushed the build/explicit-gcc-presets branch from 8bdafa7 to ccf8fb1 Compare May 22, 2026 19:24
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

status: needs review The pull request is ready for maintainer review

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[Beginner]: Add linux-x64-gcc-{debug,release} presets and document linux-x64-{debug,release} as GCC defaults

1 participant