ITADN

[Bug] cmake-kits.json boolean cmakeSettings are broken

#4927Openstertingen 创建于 2026-05-05
bugtriage
S
stertingencommented
### Brief Issue Summary With https://github.com/microsoft/vscode-cmake-tools/pull/4823, `cmakeSettings` in `cmake-kits.json` requires all values to be a string or list of strings. Before that, boolean values (true, false) were allowed. Also, values such as `"ON"` or `"TRUE"` are explicitly passed as string, effectively eliminating their boolean nature. (like `-DBUILD_TESTING:STRING=ON` I would propose to allow writing boolean values to the JSON file again, which are passed as boolean values to CMake. (like `-DBUILD_TESTING:BOOL=ON`) With passing the boolean value as string, the CMake Cache editor does not show a checkbox when it should: <img width="808" height="276" alt="Image" src="https://github.com/user-attachments/assets/01136c37-9422-475c-90b4-5924427b10e0" /> ### CMake Tools Diagnostics ```shell { "os": "linux", "vscodeVersion": "1.117.0", "cmtVersion": "1.23.52", "configurations": [ { "folder": "<REDACTED>", "cmakeVersion": "3.28.3", "configured": true, "generator": "Unix Makefiles", "usesPresets": false, "compilers": {} } ], "cpptoolsIntegration": { "isReady": false, "hasCodeModel": false, "activeBuildType": "", "buildTypesSeen": [], "requests": [], "responses": [], "partialMatches": [], "targetCount": 0, "executablesCount": 0, "librariesCount": 0, "targets": [] }, "settings": [ { "communicationMode": "automatic", "useCMakePresets": "auto", "configureOnOpen": true } ] } ``` ### Debug Log ```shell [kit] Invalid kit contents cmake-kits.json (<REDACTED>/.vscode/cmake-kits.json): [kit] >> /0/cmakeSettings/BUILD_TESTING: must be string [kit] >> /0/cmakeSettings/BUILD_TESTING: must be array [kit] >> /0/cmakeSettings/BUILD_TESTING: must match exactly one schema in oneOf ``` ### Additional Information _No response_
0 条评论