Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add an option to the Makefile for creating compile_command.sjson #11

Open
wants to merge 2 commits into
base: master
Choose a base branch
from

Conversation

johannes
Copy link

compile_command.json is a compilation database files used by different clangd based IDEs and editors for more accurate code completion.

In this patch a make target compile-commands is added as a PHONY target which creates such a file. The target is PHONY for easy updating of the database file.

The logic used for creating is trivial and will treat all files as C++ (even the .m, .mm and .c files) and won't do escaping of " in any path. The resulting file is created in the root directory, not inside the build dir, so IDEs and tools can find it easily.

Information on compile_commands.json can be found on https://clang.llvm.org/docs/JSONCompilationDatabase.html

`compile_command.json` is a compilation database files used by different
clangd based IDEs and editors for more accurate code completion.

In this patch a make target `compile-commands` is added as a PHONY
target which creates such a file. The target is PHONY for easy updating
of the database file.

The logic used for creating is trivial and will treat all files as C++
(even the `.m`, `.mm` and `.c` files) and won't do escaping of `"` in
any path.

Information on `compile_commands.json` can be found on
https://clang.llvm.org/docs/JSONCompilationDatabase.html
@ceeac
Copy link
Contributor

ceeac commented Sep 24, 2019

Hello, this repository is just a mirror of the original svn repository. You can try submitting your PR as an svn compatible patch (git diff --no-prefix) to the Simutrans forum here.

ceeac pushed a commit to ceeac/simutrans that referenced this pull request Jun 21, 2020
ceeac pushed a commit to ceeac/simutrans that referenced this pull request Aug 27, 2022
Finally fix zstd static build aburch#4 and other build systems
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants