How do I make it generate compile_commands.json in vscode? #103
Unanswered
DiogoM-Almeida
asked this question in
Q&A
Replies: 1 comment 5 replies
-
You have to make sure you are using a compatible generator and enable the CMAKE_EXPORT_COMPILE_COMMANDS variable in your configure preset. This is already done for you in the Linux and MacOS presets: https://github.com/friendlyanon/cmake-init/blob/master/cmake-init/templates/common/CMakeUserPresets.json#L23 On Windows, you'll have to switch to using Ninja as your generator. It's bundled with Visual Studio build tools along with CMake, so it'll be available from a vcvars enabled command line. |
Beta Was this translation helpful? Give feedback.
5 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
When I generate the CMakeLists.txt manually and use CMake Tools I can generate it, but with the CMakeLists.txt here I am not able to generate it
Beta Was this translation helpful? Give feedback.
All reactions