github / github/codeql-cli-binaries

Can codeql binary use compile_database.json for cpp projects?

オープン
#9 コメント 1 件 リアクション 8 件 担当者 1 名 @p0 が担当を希望しています GitHub で見る
CLI enhancement
主要言語
言語のデータがありません
スター
1k
フォーク
184
PR マージ指標
30日以内にマージされた PR はありません

説明

Do I understand correctly, that to create new database with codeql for cpp project, it is enough to provide a list of files and build flags?

If so, can you please add an option to create a database from `compile_commands.json` file (https://clang.llvm.org/docs/JSONCompilationDatabase.html)?

If project uses **cmake**, to generate it, it is enough to define a single var:
```
set(CMAKE_EXPORT_COMPILE_COMMANDS ON)
```

If project uses **autotools**, like bitcoin or linux, it is enough to execute [`compiledb`](https://github.com/nickdiego/compiledb)
```
./autotools.sh
./configure
compiledb -n make
```

I am sure, there are ways to generate one for other build systems.

This feature can save a lot of time during database creation for cpp projects, because generation of this file is fast, as opposed to providing `-c` flag to `codeql` binary to actually build the project.

コントリビューションガイド

コントリビューションガイドを開く

評価

この issue はまだ評価されていません。

新しい issue をメールで受け取る

初心者向けの GitHub issue を短くまとめたダイジェスト。