-
Notifications
You must be signed in to change notification settings - Fork 450
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
CMake: Compile Active File command stopped working in v1.9.0 #2180
Comments
@aliaksei-bahdanau, thank you for opening this bug. I am investigating and we will definitely fix this for a soon quick patch update 1.9.1. And we will send you a vsix with a fix even before that, to unblock you faster. EDIT2: It works if you define "cmake.copyCompileCommands" or "cmake.mergedCompileCommands". |
Hi, I'm not sure if it's related but I have an issue with the "compile active file" action even after applying your workaround (enabling Note that I've never tried this action before today, so I can't say if it was working before v1.9.0. |
Nevermind it seems unrelated to this issue and probably out of your control: microsoft/vscode#38137 |
@stilllman, you are right, this is a VSCode bug and we had users that reported this before. See this closed GitHub issue. |
@aliaksei-bahdanau, a fix for this problem was included in the CMake Tools 1.9.1 release. Upgrade your extension in VSCode and let us know if you encounter any other issues. |
I am experiencing the same issue with the latest updates: OS: Fedora 35 settings.json: {
"C_Cpp.default.configurationProvider": "ms-vscode.cmake-tools",
"cmake.loggingLevel": "debug",
"cmake.skipConfigureIfCachePresent": true,
"cmake.useCMakePresets": "always"
} CMakeLists.txt: cmake_minimum_required(VERSION 3.22)
set(CMAKE_CXX_COMPILER /usr/bin/g++)
project(HELLO LANGUAGES CXX)
add_executable(hello main.cpp) CMakePresets.json: {
"version": 3,
"cmakeMinimumRequired": {
"major": 3,
"minor": 22,
"patch": 0
},
"configurePresets": [
{
"name": "linux-base",
"hidden": true,
"condition": {
"type": "equals",
"lhs": "${hostSystemName}",
"rhs": "Linux"
}
},
{
"name": "multi-config-base",
"binaryDir": "buildc",
"hidden": true
},
{
"name": "linux-ninja-multi-config",
"generator": "Ninja Multi-Config",
"displayName": "Ninja",
"description": "Multi-Config",
"inherits": [
"linux-base",
"multi-config-base"
]
}
],
"buildPresets": [
{
"name": "linux-base",
"hidden": true,
"condition": {
"type": "equals",
"lhs": "${hostSystemName}",
"rhs": "Linux"
}
},
{
"name": "debug-base",
"configuration": "Debug",
"hidden": true
},
{
"name": "release-base",
"configuration": "Release",
"hidden": true
},
{
"name": "relwithdebinfo-base",
"configuration": "RelWithDebInfo",
"hidden": true
},
{
"name": "linux-ninja-multi-config-debug",
"configurePreset": "linux-ninja-multi-config",
"displayName": "Debug",
"inherits": [
"linux-base",
"debug-base"
]
},
{
"name": "linux-ninja-multi-config-release",
"configurePreset": "linux-ninja-multi-config",
"displayName": "Release",
"inherits": [
"linux-base",
"release-base"
]
},
{
"name": "linux-ninja-multi-config-relwithdebinfo",
"configurePreset": "linux-ninja-multi-config",
"displayName": "RelWithDebInfo",
"inherits": [
"linux-base",
"relwithdebinfo-base"
]
}
]
} main.cpp: #include <iostream>
int
main(int argc, char* argv[])
{
std::cout << "Hello, World!" << std::endl;
return 0;
} When I run the "CMake: Compile Active File" from the command palette or when I right-click the source file in the CMake outline and choose "Compile File", I get the following in the Output window:
|
Brief Issue Summary
CMake: Compile Active File command stopped working in v1.9.0. Tried on Lunux and Windows
Shows error: "Unable to find compilation information for this file"
CMake Tools Diagnostics
Debug Log
The text was updated successfully, but these errors were encountered: