Sarcasm / compdb

The compilation database Swiss army knife
MIT License
292 stars 23 forks source link

Use with cmake #27

Closed rsp4jack closed 5 months ago

rsp4jack commented 2 years ago

I need to use compdb in cmake. So I try this:

execute_process(COMMAND "python.exe" "-m" "compdb" "-p" "build" "list" WORKING_DIRECTORY ${PROJECT_SOURCE_DIR}  ECHO_ERROR_VARIABLE ECHO_OUTPUT_VARIABLE)

But it did not effect. CMake generates compile_commands.json after configure, so compdb's output will be overwrited by CMake.

I do not know how to call compdb after CMake generates compile_commands.json. Can anyone help me?

ileixe commented 3 months ago

I'm interested in this feature as well. Did you figure out the way?