compdb
compdb copied to clipboard
Use with cmake
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?