microsoft / microsoft/vscode-cmake-tools

Release target, Debug output

Open
#3,829 10 comments 0 reactions 0 assignees View on GitHub
documentation question
Dominant language
TypeScript
Stars
1.7k
Forks
546
Avg merge
2d 16h
Merged PRs (30d)
32

Description

### Brief Issue Summary

Target is Release by setting "CMAKE_BUILD_TYPE": "Release" in the CMakePresets.json file.

using the CMake Debugger I see inconsistent values set:

image

image

**Output from build:**
[build] Building Custom Rule G:/dev/cmaketest/CMakeLists.txt
[build] main.cpp
[build] cmaketest.vcxproj -> **G:\dev\cmaketest\bin\Debug\cmaketest.exe**

### CMake Tools Diagnostics

```shell
[main] Building folder: cmaketest
[expand] expanding cmake
[main] Saving open files before configure/build
[expand] expanding cmake
[expand] expanding cmake
[build] Starting build
[driver] Start build
[expand] expanding --build
[expand] expanding g:/dev/cmaketest/build/vs_release
[expand] expanding --parallel
[expand] expanding 34
[proc] Executing command: "C:\Program Files\Microsoft Visual Studio\2022\Preview\Common7\IDE\CommonExtensions\Microsoft\CMake\CMake\bin\cmake.exe" --build g:/dev/cmaketest/build/vs_release --parallel 34
[proc] with environment: {"ALLUSERSPROFILE":"C:\\ProgramData","AMDRMSDKPATH":"C:\\Program Files\\AMD\\RyzenMasterSDK\\","APPDATA":"C:\\Users\\tengai\\AppData\\Roaming","APPLICATION_INSIGHTS_NO_DIAGNOSTIC_CHANNEL":"1","CHROME_CRASHPAD_PIPE_NAME":"\\\\.\\pipe\\crashpad_40236_FRQZBGHRRJHZTDPK","COMPUTERNAME":"MSI_MAG","ComSpec":"C:\\Windows\\system32\\cmd.exe","CommonProgramFiles":"C:\\Program Files\\Common Files","CommonProgramFiles(x86)":"C:\\Program Files (x86)\\Common Files","CommonProgramW6432":"C:\\Program Files\\Common Files","DriverData":"C:\\Windows\\System32\\Drivers\\DriverData","EFC_6040":"1","ELECTRON_RUN_AS_NODE":"1","HOMEDRIVE":"C:","HOMEPATH":"\\Users\\tengai","LOCALAPPDATA":"C:\\Users\\tengai\\AppData\\Local","LOGONSERVER":"\\\\MSI_MAG","NUMBER_OF_PROCESSORS":"32","ORIGINAL_XDG_CURRENT_DESKTOP":"undefined","OS":"Windows_NT","OneDrive":"C:\\Users\\tengai\\OneDrive","PATHEXT":".COM;.EXE;.BAT;.CMD;.VBS;.VBE;.JS;.JSE;.WSF;.WSH;.MSC","PROCESSOR_ARCHITECTURE":"AMD64","PROCESSOR_IDENTIFIER":"AMD64 Family 25 Model 97 Stepping 2, AuthenticAMD","PROCESSOR_LEVEL":"25","PROCESSOR_REVISION":"6102","PSModulePath":"C:\\Program Files\\WindowsPowerShell\\Modules;C:\\Windows\\system32\\WindowsPowerShell\\v1.0\\Modules","PUBLIC":"C:\\Users\\Public","Path":"C:\\Program Files (x86)\\Common Files\\Oracle\\Java\\javapath;C:\\Windows\\system32;C:\\Windows;C:\\Windows\\System32\\Wbem;C:\\Windows\\System32\\WindowsPowerShell\\v1.0\\;C:\\Windows\\System32\\OpenSSH\\;","ProgramData":"C:\\ProgramData","ProgramFiles":"C:\\Program Files","ProgramFiles(x86)":"C:\\Program Files (x86)","ProgramW6432":"C:\\Program Files","SESSIONNAME":"Console","SystemDrive":"C:","SystemRoot":"C:\\Windows","TEMP":"C:\\Users\\tengai\\AppData\\Local\\Temp","TMP":"C:\\Users\\tengai\\AppData\\Local\\Temp","USERDOMAIN":"MSI_MAG","USERDOMAIN_ROAMINGPROFILE":"MSI_MAG","USERNAME":"tengai","USERPROFILE":"C:\\Users\\tengai","VSCODE_AMD_ENTRYPOINT":"vs/workbench/api/node/extensionHostProcess","VSCODE_CODE_CACHE_PATH":"C:\\Users\\tengai\\AppData\\Roaming\\Code\\CachedData\\611f9bfce64f25108829dd295f54a6894e87339d","VSCODE_CRASH_REPORTER_PROCESS_TYPE":"extensionHost","VSCODE_CWD":"C:\\Users\\tengai\\AppData\\Local\\Programs\\Microsoft VS Code","VSCODE_HANDLES_UNCAUGHT_ERRORS":"true","VSCODE_IPC_HOOK":"\\\\.\\pipe\\e3ec2487-1.90.1-main-sock","VSCODE_L10N_BUNDLE_LOCATION":"","VSCODE_NLS_CONFIG":"{\"locale\":\"en-us\",\"osLocale\":\"en-us\",\"availableLanguages\":{},\"_languagePackSupport\":true}","VSCODE_PID":"40236","windir":"C:\\Windows"}
[build] MSBuild version 17.10.4+10fbfbf2e for .NET Framework
[build]
[build] 1>Checking Build System
[build] Building Custom Rule G:/dev/cmaketest/CMakeLists.txt
[build] main.cpp
[build] cmaketest.vcxproj -> G:\dev\cmaketest\bin\Debug\cmaketest.exe
[driver] Build completed: 00:00:00.676
[cmakefileapi-parser] Read reply folder: g:\dev\cmaketest\build\vs_release\.cmake\api\v1\reply
[cmakefileapi-parser] Found index files: ["cache-v2-4cdfd5cd365193e95fa0.json","cmakeFiles-v1-a99b99d1dcae1d8b6cbe.json","codemodel-v2-5aa90601171cace3b494.json","directory-.-Debug-d0094a50bb2071803777.json","directory-.-MinSizeRel-d0094a50bb2071803777.json","directory-.-Release-d0094a50bb2071803777.json","directory-.-RelWithDebInfo-d0094a50bb2071803777.json","index-2024-06-13T21-59-33-0164.json","target-ALL_BUILD-Debug-4f031107cb65c5d86a82.json","target-ALL_BUILD-MinSizeRel-4f031107cb65c5d86a82.json","target-ALL_BUILD-Release-4f031107cb65c5d86a82.json","target-ALL_BUILD-RelWithDebInfo-4f031107cb65c5d86a82.json","target-cmaketest-Debug-583dc167010728bf41c2.json","target-cmaketest-MinSizeRel-7b20aa68503247c998bd.json","target-cmaketest-Release-caf7a8a5d9ac7faaddd3.json","target-cmaketest-RelWithDebInfo-201f29ce9bf298a820d7.json","target-ZERO_CHECK-Debug-6262fa8b4446a7988aa8.json","target-ZERO_CHECK-MinSizeRel-6262fa8b4446a7988aa8.json","target-ZERO_CHECK-Release-6262fa8b4446a7988aa8.json","target-ZERO_CHECK-RelWithDebInfo-6262fa8b4446a7988aa8.json","toolchains-v1-9a5931a20e5c7dd3bed0.json"]
[expand] expanding cmake
[expand] expanding G:/dev/cmaketest
[build] Build finished with exit code 0
[expand] expanding cmake
[cache] Reading CMake cache file g:/dev/cmaketest/build/vs_release/CMakeCache.txt
[cache] Parsing CMake cache string
[expand] expanding cmake
[extension] [1603] cmake.build finished (returned 0)
[expand] expanding cmake
[cache] Reading CMake cache file g:/dev/cmaketest/build/vs_release/CMakeCache.txt
[cache] Parsing CMake cache string
```

### Debug Log

_No response_

### Additional Information

configurePresets": [
{
"name": "vs_release",
"displayName": "VS Release Custom preset",
"description": "Sets Visual Studio generator, build and install directory",
"generator": "Visual Studio 17 2022",
"binaryDir": "${workspaceFolder}/build/${presetName}",
"architecture": {
"value": "x64",
"strategy": "external"
},
"cacheVariables": {
"BOOST_ROOT": "G:/dev/boost_1_85_0",
**"CMAKE_BUILD_TYPE": "Release"**
}
}
]

Contributor guide

Open the contributing guide

Research direction

Reproduce the issue using the supplied CMakePresets.json configure preset with the Visual Studio 17 2022 generator, then run the reported build command and compare its output directory with the selected preset. Done means the Release preset builds the executable under the expected Release configuration rather than Debug.

Written by the indexing model from the issue text.

Assessment

Tech stack
cmake
Domain
build-system
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.