Unexpanded response file is not supported

Please provide

  • Operating system: Win 10
  • Visual Studio version: VS 2022 Professional (17.9)
  • SonarLint plugin version: 7.6
  • Programming language you’re coding in: C/C++
  • Is connected mode used: no

And a thorough description of the problem / question:
Hey guys,
after the latest VS update (which probably did result in a CMake Update) i’m getting lots of " Unsupported configuration: Unexpanded response file is not supported xxxxxx..cpp.obj.modmap" errors in Sonarlint.
I’m using CMakePresets and I’m generating my compile_commands.json via Cmake.
From another thread I have learned that sonarlint does not expand paths by itself.

Now I can obviously use the solution and then everything works fine, but I prefer the use Ninja Multi Config Generator because it is much faster.
Unfortunately the solution suggested in this thread CMAKE_CXX_USE_RESPONSE_FILE_FOR_INCLUDES only works for Makefile Generators. It’s not even documented in the Cmake docs. Do you have another idea how to make CMake produce a compatible compile_commands.json.

(It would be even better if sonarlint would support cmake presets out of the box, then I would not need the workaround with the compile_commands.json :wink: )

Thx guys for your help :slight_smile:

Hi @JuliusCaesar89 and nice to see you again!

Thanks for your detailed description. According to the investigation in this thread, there is a problem that affects the Ninja generator in CMake 3.28.1 that got fixed in 3.28.2. Could you confirm that you are using version 3.28.1, and if so, would it be possible for you to use a different version?

Best regards,

Hey @michael.jabbour thx foru your fast reply.
I installed latest cmake and added this (custom) cmake installation to VS and it works again.
Thx alot for your help!


This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.