Skip to content

Add support for FASTBuild generator (CMake 4.2+)#4690

Draft
Copilot wants to merge 5 commits intomainfrom
copilot/add-fastbuild-generator-support
Draft

Add support for FASTBuild generator (CMake 4.2+)#4690
Copilot wants to merge 5 commits intomainfrom
copilot/add-fastbuild-generator-support

Conversation

Copy link
Contributor

Copilot AI commented Feb 3, 2026

  • Understand the issue: CMake 4.2+ supports FASTBuild generator, but vscode-cmake-tools doesn't recognize it
  • Identify where generators are defined and validated
  • Add "FASTBuild" to the cmakeGenerators array in src/drivers/cmakeDriver.ts
  • Add FASTBuild detection logic in findBestGenerator method (check for fbuild command)
  • Add FASTBuild to isCommonGenerator for proper handling
  • Update CHANGELOG.md with the new feature
  • Run code review
  • Run codeql_checker
  • Fix linting error (no-return-await)
  • Fix CHANGELOG to link to PR instead of issue

Root Cause

The cmakeGenerators array in src/drivers/cmakeDriver.ts did not include "FASTBuild" as a known generator, causing the extension to reject it when users set cmake.preferredGenerators to ["FASTBuild"].

Solution

  1. Added "FASTBuild" to the list of known CMake generators (cmakeGenerators array)
  2. Added detection logic in findBestGenerator() to check for the fbuild command (FASTBuild build tool)
  3. Added "FASTBuild" to isCommonGenerator() for consistent handling with other makefile-type generators

Changes

How to Manually Verify

  1. Install CMake 4.2+ and FASTBuild
  2. Set "cmake.preferredGenerators": ["FASTBuild"] in VS Code settings
  3. Configure a CMake project - it should no longer show "No usable generator found" error
  4. The extension should detect the fbuild command and allow using FASTBuild generator

Regression Risks

  • Minimal: Changes only add new entries to existing lists/conditions
  • Existing generator detection logic is unchanged
  • Only affects users who explicitly set FASTBuild as their preferred generator

Security Summary

  • No security vulnerabilities found by CodeQL
Original prompt

This section details on the original issue you should resolve

<issue_title>[Feature] Add support of fastbuild generator (cmake 4.2 +)</issue_title>
<issue_description>### Request Overview

cmake now support fastbuild generator (since 4.2 released few days ago)
https://cmake.org/cmake/help/latest/generator/FASTBuild.html
In settings when i put this
"cmake.preferredGenerators": [
"FASTBuild"

it is not supported
[rollbar] Unhandled exception: Unhandled Promise rejection: cleanConfigure Error: No usable generator found. {}

Additional Information

No response</issue_description>

<agent_instructions>You are Copilot coding agent acting as a senior maintainer/contributor for the VS Code extension repository microsoft/vscode-cmake-tools.

You are deeply familiar with CMake, CMake Presets, CTest, kit/toolchain selection, VS Code extension APIs, and the architecture of this repo.

Your job is to resolve the assigned GitHub issue in a maintainable way, matching existing patterns and UX.

When approaching the issue, follow these steps exactly:

  1. Read and understand the whole issue thread, analyze any comments and links, and identify the problem/request before starting work on the solution.
  2. If the issue is a regression, look at previous commits and PRs. Note in the PR comments where you think the regression occurred and in what PR/commit.
  3. Before generating a solution, see if there is an existing solution pattern elsewhere in the vscode-cmake-tools repo that you can follow. Consider also looking at the docs hosted in the repo as well.
  4. Always follow existing structures and conventions for maintainability. Be aware of regression risks.
  5. Always add tests covering the changes if it makes sense. Also make sure to update the existing tests to handle the changes if needed.
  6. For localization changes, never update any files under the i18n directory. You can assume that the changes you need to happen in those files will by updated later based on the localization changes you made elsewhere in the repo.
  7. Once you have come up with a solution to the assigned issue, update the description with the root cause of the issue, the solution to the issue, how the solution addresses the issue, what tests where added/updated and why, and how to manually verify the changes especially focusing on how to test regression risks.
  8. Make sure to update the changelog with an explanation of how the solution affects the user experience (not what we changed internally). For improvements and bugs, link the assigned issue. For features, link the PR with the feature changes.

Note: When addressing Intellisense issues, you may need to look at how the CMake Tools extension interfaces with the Cpp Tools extension. The Cpp Tools extension handles C and C++ Intellisense by allowing other extensions to interface with it. You may want to look at the vscode-cpptools repo to understand how the CMake Tools extension interfaces with the Cpp Tools extension. Here is the Cpp Tools extension repo link (vscode-cpptools): https://github.com/microsoft/vscode-cpptools</agent_instructions>

Comments on the Issue (you are @copilot in this section)


✨ Let Copilot coding agent set things up for you — coding agent works faster and does higher quality work when set up for your repo.

Copilot AI and others added 2 commits February 3, 2026 20:38
Co-authored-by: snehara99 <113148726+snehara99@users.noreply.github.com>
Co-authored-by: snehara99 <113148726+snehara99@users.noreply.github.com>
Copilot AI changed the title [WIP] Add support for FASTBuild generator in CMake tools Add support for FASTBuild generator (CMake 4.2+) Feb 3, 2026
Copilot AI requested a review from snehara99 February 3, 2026 20:41
@snehara99
Copy link
Contributor

@copilot both the CI (Linux) and CI (Windows) pipelines are filing due to linting errors. Can you update the PR to abide by the linting rules?

Co-authored-by: snehara99 <113148726+snehara99@users.noreply.github.com>
Copy link
Contributor Author

Copilot AI commented Feb 3, 2026

@copilot both the CI (Linux) and CI (Windows) pipelines are filing due to linting errors. Can you update the PR to abide by the linting rules?

Fixed in f1ba777. Removed the redundant await on the return value that was causing the no-return-await linting error.

@snehara99
Copy link
Contributor

@copilot since this is a feature, you need to link the PR and not the issue in the changelog. The PR is #4690

Co-authored-by: snehara99 <113148726+snehara99@users.noreply.github.com>
Copy link
Contributor Author

Copilot AI commented Feb 3, 2026

@copilot since this is a feature, you need to link the PR and not the issue in the changelog. The PR is #4690

Fixed in 1b41225. Updated CHANGELOG to link to PR #4690 instead of issue #4663.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[Feature] Add support of fastbuild generator (cmake 4.2 +)

2 participants