indoorvivants / sn-vcpkg

SBT/Mill plugins (and a CLI) to install C/C++ dependencies using Vcpkg (https://vcpkg.io/en/index.html), with Scala Native integration
16 stars 2 forks source link

[CLI, SBT, Mill] Provide a command/flag to generate compile_flags.txt #174

Open keynmol opened 4 months ago

keynmol commented 4 months ago

See https://clang.llvm.org/docs/JSONCompilationDatabase.html#alternatives

I've found myself regularly using sn-vcpkg to play around with C examples, e.g. sn-vcpkg clang cairo -- test.c - problem is that I don't have clangd working in test.c because it's missing compilation flags.

So I'd like something to generate compiler_flags.txt in locations managed by sn-vcpkg.

For CLI I'd like to have a setup-clangd subcommand or something