Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

"Build" button builds wrong target when using tasks.json #1576

Closed
sclukey opened this issue Nov 27, 2020 · 2 comments · Fixed by #1645
Closed

"Build" button builds wrong target when using tasks.json #1576

sclukey opened this issue Nov 27, 2020 · 2 comments · Fixed by #1645
Assignees
Labels
bug a bug in the product Feature: build
Milestone

Comments

@sclukey
Copy link

sclukey commented Nov 27, 2020

Brief Issue Summary

When using a build task, the "Build" buttons in the CMake Project Outline (both the one in-line with the target, and the one in the target's context menu) do not build the correct target. It seems to build the target that was marked as the "Build Target" when the window was reloaded.

Note, some form of this issue also occurred before the new tasks integration, but the buttons used to at least track the current Build Target. Now, it seems completely broken.

Expected:

Build buttons associated with each target build the target they are associated with

Apparent Behavior:

BuildWrongTarget

CMake Tools Log

> Executing task: /usr/bin/cmake --build /path/cmake-tools-issue-repros/build --config Debug --target Program1 -- -j 14 <

ninja: no work to do.

Terminal will be reused by tasks, press any key to close it.

Developer Tools Log

[main] Building folder: cmake-tools-issue-repros Program2
[main] Saving open files before configure/build
[build] Starting build
[driver] Start build Program2
[driver] Runnnig pre-configure checks and steps
[proc] Executing command: /usr/bin/cmake --build /path/cmake-tools-issue-repros/build --config Debug --target Program2 -- -j 14
[cmakefileapi-parser] Read reply folder: /path/cmake-tools-issue-repros/build/.cmake/api/v1/reply
[cmakefileapi-parser] Found index files: ["cache-v2-6a5795a39105ba64c2b9.json","codemodel-v2-735653c4ee88b71fb057.json","index-2020-11-27T19-01-15-0378.json","target-Program1-Debug-0ba81c5d52bd99a4c4fe.json","target-Program2-Debug-4b3c411d0f9a00614b05.json"]
[driver] Run _refreshExpansions
[driver] Run _refreshExpansions cb
[build] Build finished with exit code 0
[extension] [2402] cmake.build finished (returned 0)
[cache] Reading CMake cache file /path/cmake-tools-issue-repros/build/CMakeCache.txt
[cache] Parsing CMake cache string

Platform and Versions

  • Operating System: Linux, Pop!_OS
  • CMake Version: 3.16.3
  • VSCode Version: 1.51.1
  • CMake Tools Extension Version: 1.5.3
  • Compiler/Toolchain: GCC 9.3.0
@andreeis
Copy link
Contributor

andreeis commented Dec 1, 2020

Thank you for opening this issue. We will investigate and fix it.

@andreeis
Copy link
Contributor

We almost have CMake Tools 1.6.0 release out the door. Until then, if you want, you can also verify if this problem has been fixed correctly by installing the vsix built here: https://github.com/microsoft/vscode-cmake-tools/actions/runs/557242002#artifacts.

@github-actions github-actions bot locked and limited conversation to collaborators Jan 30, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
bug a bug in the product Feature: build
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants