Skip to content

Conversation

@OrkunTokdemir
Copy link
Collaborator

Summary

This PR adds comprehensive CMake Presets support to the Qt C++ extension and improves the testing infrastructure.

Changes

CMake Presets Support

  • qt-core: Remove the setting that forces `cmake.useCMakePresets` to 'never', allowing users to use CMake Presets if they choose
  • qt-cpp: Add version check for CMake Tools extension to detect outdated versions that don't support `useCMakePresets` property
  • qt-cpp: Add configuration option `doNotWarnOutdatedCMakeTools` to suppress warnings about outdated CMake Tools extension
  • qt-cpp: Skip kit management operations for projects using CMake Presets (only run for Kit-based projects)

Testing Improvements

  • qt-cpp: Implement comprehensive build test for CMake Presets workflow using `CMAKE_PREFIX_PATH`
  • qt-cpp: Add verification that `INSTALLATION_PATH` is correctly set in CoreAPI when using Presets
  • qt-cpp: Update `prepareCMakeQtEnvWithVersion` to return `qtDir` in result object for explicit environment control
  • qt-lib: Add `ExtensionInstallInfo` interface with optional `preRelease` flag for test infrastructure
  • qt-lib: Update all test runners to support installing pre-release extensions (needed for CMake Tools pre-release)

Code Cleanup

  • qt-cpp: Remove dead code from extension initialization

Testing

The changes include:

  • New build test for CMake Presets that verifies configuration, build, and CoreAPI integration
  • Existing Kit-based tests continue to work
  • Test infrastructure supports both stable and pre-release CMake Tools extension

Related Issues

Task-number: VSCODEEXT-64

@OrkunTokdemir OrkunTokdemir requested review from benchoq, leena-miettinen and lugerard and removed request for lugerard November 14, 2025 11:56
@OrkunTokdemir OrkunTokdemir force-pushed the orkun_presets_test_12_10_2025 branch 6 times, most recently from 8749eed to 4e8ed8a Compare November 14, 2025 15:57
const quietArgs = [...args, ...getQuietVSCodeArgs()];
const required = ['ms-vscode.cmake-tools', localQtCoreVsix];
const required: ExtensionInstallInfo[] = [
{ idOrVsix: 'ms-vscode.cmake-tools', preRelease: true },
Copy link
Collaborator

Choose a reason for hiding this comment

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

Is preRelease needed here? I don't see commands.test.mts and extension.test.mts depending on it.

benchoq
benchoq previously approved these changes Nov 17, 2025
@OrkunTokdemir OrkunTokdemir marked this pull request as draft November 19, 2025 13:40
@OrkunTokdemir OrkunTokdemir force-pushed the orkun_presets_test_12_10_2025 branch from 4e8ed8a to ef807a7 Compare November 19, 2025 14:14
…ions in tests

Update installExtensionWithRetry to accept ExtensionInstallInfo object
with optional preRelease flag. This allows test runners to install
pre-release versions of extensions like CMake Tools when needed.
Update all test runners to use the new interface.
Add qtDir property to the ResolveResult returned by prepareCMakeQtEnvWithVersion.
This provides direct access to the Qt6_DIR path without requiring callers to
reconstruct it from the leaf path. Remove automatic process.env.Qt6_DIR setting
to give callers explicit control over environment configuration.
@OrkunTokdemir OrkunTokdemir force-pushed the orkun_presets_test_12_10_2025 branch from ef807a7 to 715b260 Compare November 19, 2025 15:24
Copy link
Collaborator

@leena-miettinen leena-miettinen left a comment

Choose a reason for hiding this comment

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

Looks good to me.

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

Labels

None yet

Development

Successfully merging this pull request may close these issues.

4 participants