microsoft / microsoft/vscode-cmake-tools

project outline doesn't show header files if grpc src (.cc) is added

Open
#3,820 3 comments 0 reactions 0 assignees View on GitHub
Feature: Project Outline View more info needed
Dominant language
TypeScript
Stars
1.7k
Forks
546
Avg merge
2d 16h
Merged PRs (30d)
32

Description

### Brief Issue Summary

in cmakelist.txt when you want to add an executable you simple write
`add_executable(${PROJECT_NAME}_exe ${SOURCES} ${HEADERS} )`
this will make sure that the project outline view will show the executable with the sources and header files

![image](https://github.com/microsoft/vscode-cmake-tools/assets/43480272/c6b51515-dc12-47df-8750-a869da7033f4)

however ...
if you try to add grpc source files ( filename.grpc.pb.cc) like so:

`add_executable(${PROJECT_NAME}_exe ${SOURCES} ${HEADERS} ${GRPC_SRCS})`

now the project outline removes any header file and create a new entry name build/proto-src

![image](https://github.com/microsoft/vscode-cmake-tools/assets/43480272/0589a268-be51-4a1f-934c-c20b5cad5f23)

header files are shown properly in any other ide, so this has to be an issue, right ?

### CMake Tools Diagnostics

_No response_

### Debug Log

_No response_

### Additional Information

_No response_

Contributor guide

Open the contributing guide

Research direction

Start with the CMakeLists.txt example using add_executable and compare the project outline when ${GRPC_SRCS} includes a .grpc.pb.cc file. Trace how the outline handles generated sources and header files, then reproduce the reported build/proto-src entry. Done means the executable retains its header files in the outline without the incorrect grouping.

Written by the indexing model from the issue text.

Assessment

Tech stack
cmake, cpp, grpc, typescript
Domain
build-system, developer-experience, tooling
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
42/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.