Title: | Generate Compilation Database for Use with 'Clang' Tools |
---|---|
Description: | Many modern C/C++ development tools in the 'clang' toolchain, such as 'clang-tidy' or 'clangd', rely on the presence of a compilation database in JSON format <https://clang.llvm.org/docs/JSONCompilationDatabase.html>. This package temporarily injects additional build flags into the R build process to generate such a compilation database. |
Authors: | Felix Held [aut, cre] |
Maintainer: | Felix Held <[email protected]> |
License: | MIT + file LICENSE |
Version: | 0.0.1 |
Built: | 2025-02-01 05:26:53 UTC |
Source: | https://github.com/cyianor/r-compdb |
Add to ignore file
add_ignore(file, add, path = ".")
add_ignore(file, add, path = ".")
file |
Either ".Rbuildignore" or ".gitignore" |
add |
The lines to add |
path |
Path to the package |
Returns TRUE invisibly
Generate Compilation Database for Use with Clang Tools
build_compile_commands(path = ".", debug = FALSE)
build_compile_commands(path = ".", debug = FALSE)
path |
The path of the package |
debug |
Set to TRUE to get verbose output |
This function invisibly returns TRUE on success.
## Not run: build_compile_commands(path = ".") ## End(Not run)
## Not run: build_compile_commands(path = ".") ## End(Not run)
Determine Path to Makevars File and Check if it Already Exists
get_makevars(path = ".")
get_makevars(path = ".")
path |
The path of the package |
A list containing
path |
The absolute path to the Makevars file |
exists |
Whether or not the Makevars file currently exists |
Check Whether a Clang Toolchain is Being Used
has_clang()
has_clang()
A logical indicating whether clang is used as a compiler
Checks that We are on a Unix Platform
is_unix()
is_unix()
A logical indicating whether we are on a Unix platform