microsoft / microsoft/vscode-cmake-tools

Do not automatically build before running CTest

Open
#2,933 3 comments 8 reactions 0 assignees View on GitHub
enhancement Feature: ctest help wanted
Dominant language
TypeScript
Stars
1.7k
Forks
546
Avg merge
2d 16h
Merged PRs (30d)
32

Description

### Brief Issue Summary

`ADD_TEST()` CMake function is not limited to only running binaries defined in CMake files. It can run any command we pass to it, making it coupled with CMake Tools extension a perfect duo for running all kinds of tests and checks. Apart from unit tests we can also run static analyzers and they do not require any of project's binaries to be present. Most of them just need `compile_commands.json`. Therefore it would be great if CMake Tools extension would not automatically start building project when running CTest. A single CMake configure is enough.

Contributor guide

Open the contributing guide

Research direction

Start by tracing the CMake Tools CTest entry point and the build step that runs before it; the issue identifies CTest and ADD_TEST() as the relevant behavior. Verify that a configured project can run CTest, including static-analyzer commands using compile_commands.json, without automatically building project binaries.

Written by the indexing model from the issue text.

Assessment

Tech stack
cmake, typescript
Domain
build-system, developer-experience, testing
Issue type
Feature
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
45/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.