microsoft / microsoft/vscode-cmake-tools
[Feature] Support CTest without CMake
Nobody has claimed this yet.
- Dominant language
- TypeScript
- Stars
- 1.7k
- Forks
- 546
- Avg merge
- 2d 16h
- Merged PRs (30d)
- 32
Description
Brief Issue Summary
We have a Python project with no compiled code, and no need for cmake. But we still like to use ctest as the test driver. It works fine from the command-line, and have the list of tests in CTestTestfile.cmake (as documented).
In order to get them into vscode test explorer, two hacks are needed to trick cmake-test-explorer to believe the source directory is a build directory:
- Create a CMakeCache.txt with a single line:
CMAKE_CTEST_COMMAND:INTERNAL=ctest - Change configuration: "cmakeExplorer.buildDir": "."
Would it be possible to make vscode-cmake-tools discover a testable directory by the existance of CTestTestfile.cmake?
CMake Tools Diagnostics
No response
Debug Log
No response
Additional Information
Migrated from this discussion thread.
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start by tracing the existing CMake Tools test discovery flow and how it identifies build directories. Use the reported CTestTestfile.cmake-only setup as the starting case, then verify that a directory containing that file is discovered without CMakeCache.txt or a special buildDir setting and that its tests appear in VS Code Test Explorer.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- cmake
- Domain
- testing-qa, tooling
- Issue type
- Feature
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100