clang_complete icon indicating copy to clipboard operation
clang_complete copied to clipboard

TODO: alternative for cmake generating .clang_complete file

Open roxma opened this issue 7 years ago • 9 comments

Current options:

  • cc_args.py
  • ake VERBOSE=1 to show the compile command and then edit the .clang_complete manually.

roxma avatar May 07 '17 16:05 roxma

compile_commands.json?

tbodt avatar May 08 '17 20:05 tbodt

cmake and meson both automatically generate that file in the build directory for the benefit of clangcheck...

tbodt avatar May 08 '17 20:05 tbodt

@tbodt Thanks, I'll look into that

roxma avatar May 09 '17 01:05 roxma

I get compile_commands.json working. The default option doesn't take compile_commands.json.

I plan to change the compile option loading process. I think this version would be more meaningful:

  • look for .clang_complete
  • If not found, fallback to compile_commands.json, and possibly build/compile_commands.json as a common convention.
  • If not found, fallback to &path variable

roxma avatar Jul 01 '17 10:07 roxma

🎉

tbodt avatar Jul 01 '17 14:07 tbodt

I think there should be an option you can set to customize the path to compile_commands.json

tbodt avatar Jul 01 '17 14:07 tbodt

Wouldn't it be more natural to put compile_commands.json in the highest priority, since it specifies the CFLAGS for every source file independantly? If a specific file is not found in compile_commands.json, we can fallback to .clang_complete as a project-wise default setting.

harrysummer avatar Jul 14 '17 12:07 harrysummer

Hi

I'm deprecating this repo.

Try https://github.com/roxma/ncm-clang instead.

roxma avatar Sep 30 '17 02:09 roxma

Nice job! Thank you! @roxma

harrysummer avatar Oct 05 '17 02:10 harrysummer