-
Notifications
You must be signed in to change notification settings - Fork 449
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
Kits: Project Status settings override .vscode/settings.json settings #3556
Comments
Aaaand I just found where that seems to come from — if I click on the CMake left toolbar icon (which I almost never do) to open the CMake drawer, in the top pane, under Project Status > Configure it says Debug, and I can click the pencil to edit and choose Release instead. So what I'll do is remove the Now I understand this extension a bit better and have a resolution to my personal case. However, an open question is what the behavior should be in order to be the most intuitive and ergonomic for most users when workspace settings and those parameters in the CMake drawer conflict. For me, because I'm editing the settings constantly along with other build flags, I expected them to dominate. I wonder what others think about that hierarchy? It's possible mine is not a common workflow, and I'd be curious to learn whether that's true. |
@towynlin Thank you for the investigation and workaround that you've already found. Thank you for the issue as well, I'll rename this issue to reflect what we settled on. Going forward, we will think through whether this is simply a bug, or whether we need to think through this experience. Thanks! |
Brief Issue Summary
My
.vscode/settings.json
contains"cmake.configureArgs"
including"-DCMAKE_BUILD_TYPE=Release"
. When I call "CMake: Delete Cache and Reconfigure" the build usesCMAKE_BUILD_TYPE=Debug
as observed in bothbuild/CMakeCache.txt
and in the build products. Lately I've been working around it by manually editingbuild/CMakeCache.txt
, after which it builds correctly using the Release type, and this warning is logged:This issue only appeared very recently, maybe (guessing) v.1.16. This setup has been working for me for months prior.
This looks like closed issue #2353 which was fixed by PR #3267 and included in v1.15. However, I'm using CMake Tools v1.16.32 with VS Code 1.85.2 on macOS 14.3 on arm64.
It also resembles currently open #3507, but my problem isn't with keyboard shortcuts and menus.
The CMake: Log Diagnostics output includes the following where "buildTypesSeen" starts as "Debug" when I Delete Cache and Reconfigure, then changes to "Release" after I edit CMakeCache.txt and build again:
There's no cpptools warning on the first build. It only appears after I edit the cache.
Particularly notable from the debug log is:
I don't know where the
CMAKE_BUILD_TYPE:STRING=Debug
comes from.Thoughts?
CMake Tools Diagnostics
Debug Log
Additional Information
No response
The text was updated successfully, but these errors were encountered: