vscode-cmake-tools icon indicating copy to clipboard operation
vscode-cmake-tools copied to clipboard

[rollbar] messages

Open decimad opened this issue 6 years ago • 9 comments

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?

decimad avatar Aug 02 '18 07:08 decimad

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?

vector-of-bool avatar Aug 02 '18 18:08 vector-of-bool

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 avatar Aug 04 '18 00:08 decimad

@decimad Can you maybe provide an example project that displays the behavior you described above? This would make debugging this much easier!

no-realm avatar Aug 04 '18 16:08 no-realm

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.

vector-of-bool avatar Aug 04 '18 18:08 vector-of-bool

Okay, I will try that. Thank you for the prompt feedback!

decimad avatar Aug 04 '18 20:08 decimad

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"]}}

apples avatar Aug 05 '18 09:08 apples

I ran into this problem as well. Went away as soon as I got the toolchain right and cached.

mmanyen avatar Aug 06 '18 15:08 mmanyen

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!

vector-of-bool avatar Aug 14 '18 04:08 vector-of-bool

@mmanyen @apples This issue is very old, is it still presenting for you? If not, I'd like to close this issue.

gcampbell-msft avatar Mar 27 '24 16:03 gcampbell-msft