Created
November 27, 2019 02:15
-
-
Save chengyi/b79e9fb3bbb466a98c44c2ad76c9c804 to your computer and use it in GitHub Desktop.
compile db generate cmake using compiledb
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
add_custom_command( | |
OUTPUT ${COMPDB} | |
WORKING_DIR ${PROJECT_SOURCE_DIR}/build | |
COMMAND compiledb -n make | |
COMMAND cp compile_commands.json ${PROJECT_SOURCE_DIR}) | |
add_custom_target(compdb ALL | |
COMMAND echo "Generate compile db." | |
DEPENDS ${COMPDB}) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment