vscode-cmake-tools
vscode-cmake-tools copied to clipboard
[rollbar] messages
Beginning since yesterday I'm seeing multiple "[rollbar] Unable to automatically determine compiler" messages, one for each custom target, when building through cmake-tools. Is there anything I can do to hide/suppress these?
At the moment, there is not, but it does indicate that there is definitely a bug in CMake Tools. You may need to work-around this bug, which will suppress the messages. Can I get more information about your setup?
Sorry I did not come around to diagnose this further today. As might be deduced by my previous questions, I'm having a project with custom variants and a toolchain file supplied by a kit. The cmake project defines multiple custom targets that don't produce binary targets. Adding to the complexity, this seemingly only happens if the cpptools-config provider stuff is active. I can only give more helpful information next week sadly :(
@decimad Can you maybe provide an example project that displays the behavior you described above? This would make debugging this much easier!
The toolchain file is a likely culprit. CMake Tools uses the cache value for the compilers to get the language compiler. In your toolchain value set the CACHE
flag when you set the CMAKE_C/CXX_COMPILER
. That's a known workaround, and I want to look into the bug because it's actually quite common.
Okay, I will try that. Thank you for the prompt feedback!
I'm experiencing this issue when using the Emscripten toolchain on Windows. Easy to reproduce.
CMakeLists.txt:
cmake_minimum_required(VERSION 3.12)
project(hello-emscripten)
add_executable(hello-emscripten main.cpp)
main.cpp:
int main() {}
cmake-tools.json:
[
{
"name": "Emscripten",
"toolchainFile": "C:\\emsdk\\emscripten\\1.37.36\\cmake\\Modules\\Platform\\Emscripten.cmake"
}
]
Output:
[cms-client] Configuring using the "Ninja" CMake generator
[cmake] Configuring done
[cmake] Generating done
[rollbar] Unable to automatically determine compiler {"lang":"CXX","fileGroup":{"compileFlags":"-g ","isGenerated":false,"language":"CXX","sources":["main.cpp"]}}
I ran into this problem as well. Went away as soon as I got the toolchain right and cached.
Looks like the source of this bug has been determined, but the best course of action to a fix is an open question. I haven't forgotten about this one!
@mmanyen @apples This issue is very old, is it still presenting for you? If not, I'd like to close this issue.