vscode-cmake-tools
vscode-cmake-tools copied to clipboard
"Run CTest" no longer works when there is no preset
Brief Issue Summary
Since the upgrade of "CMake Tools" extension to version v1.17.15, when I click "Run CTest" in the status bar, I get the error "[ctest] test.preset.not.set Test preset is not set" and unit tests are not run.
Additional notes:
- CMake presets are not used in my environment (no "CMakePresets.json" file).
- When running a single unit test from Test Explorer, test is run successfully.
- Setting useCMakePresets from "auto" -> "never", does not fix the issue
- Downgrading "CMake Tools" extension to previous version v1.16.32, fixes the issue.
CMake Tools Diagnostics
{
"os": "linux",
"vscodeVersion": "1.86.1",
"cmtVersion": "1.17.15",
"configurations": [
{
"folder": "/home/axis/workspace/map-core",
"cmakeVersion": "3.26.4",
"configured": true,
"generator": "Unix Makefiles",
"usesPresets": false,
"compilers": {
"C": "/opt/rh/devtoolset-12/root/usr/bin/gcc",
"CXX": "/opt/rh/devtoolset-12/root/usr/bin/g++"
}
}
],
"cpptoolsIntegration": {
"isReady": true,
"hasCodeModel": true,
"activeBuildType": "Debug",
"buildTypesSeen": [
"Debug"
],
"requests": [],
"responses": [],
"partialMatches": [],
"targetCount": 97,
"executablesCount": 32,
"librariesCount": 36,
"targets": []
},
"settings": [
{
"communicationMode": "automatic",
"useCMakePresets": "auto",
"configureOnOpen": true
}
]
}
Debug Log
[main] Building folder: map-core
[build] Starting build
[proc] Executing command: /opt/cmake/bin/cmake --build /home/axis/workspace/map-core/build --config Debug --target all -j 4 --
[build] [ 1%] Built target axmapserializer_object
... snip....
[build] [100%] Built target tpv_gtestu
[driver] Build completed: 00:00:01.068
[build] Build finished with exit code 0
[ctest] test.preset.not.set Test preset is not set
Additional Information
No response
@ebouteillon Thanks for letting us know about this regression. Is there a way that you could share with us a minimal repro project so that we could quickly investigate this?
@ebouteillon Update, I believe I found the issue, could you manually install this vsix and confirm that this fixes your issue? cmake-tools.zip
To install it,
- Download the zip, and rename it to change the extension to .vsix
- Navigate to the extensions pane and install a manual vsix:
I believe this will fix your issue, and I have a PR out here: #3590. However, before merging, it'd be great for you to confirm that this fixes your issue. Thanks!
Hi @gcampbell-msft , thanks for the quick response. I confirm it is working with the .vsix provided.
@ebouteillon Perfect, assuming the PR merges today, it will be in the pre-release starting tomorrow, and we plan to path an official release early next week. Thanks!