microsoft / microsoft/vscode-cmake-tools

CMake Tools does not detect executables added in ExternalProject_Add

Open
#1,485 6 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Feature: debug/launch investigation needed
Dominant language
TypeScript
Stars
1.7k
Forks
546
Avg merge
2d 16h
Merged PRs (30d)
32

Description

Brief Issue Summary

I have configured cmake to use ExternalProject_Add to set up a project that has multiple cross-compilation targets.
These all call 'add_executable'. The executables are placed in the correct location, but CMake Tools does not create any launch configurations for it.

Expected:

I am expecting VSCode to have the launch target options available.

Apparent Behavior:

It does not populate any target information, even though "add_executable" is called.

CMake Tools Log

N/A
If I run "debug target" without modifying launch.json, the log will say
"[main] Failed to prepare executable target with name 'undefined'"

Developer Tools Log
Platform and Versions
  • Operating System: Windows
  • CMake Version: 3.14.0
  • VSCode Version: 1.49.3
  • CMake Tools Extension Version: 1.4.2
  • Compiler/Toolchain: MiGW 64-bit GCC 4.8.3
Other Notes/Information

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by reproducing the project setup using ExternalProject_Add with multiple add_executable targets, then follow the CMake Tools target discovery path invoked by “debug target.” Done means the extension detects the external executables and VSCode exposes launch target options instead of reporting an undefined target.

Written by the indexing model from the issue text.

Assessment

Tech stack
cmake
Domain
build-system, devtools
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.