Package 'compdb'

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

Help Index


Add to ignore file

Description

Add to ignore file

Usage

add_ignore(file, add, path = ".")

Arguments

file

Either ".Rbuildignore" or ".gitignore"

add

The lines to add

path

Path to the package

Value

Returns TRUE invisibly


Generate Compilation Database for Use with Clang Tools

Description

Generate Compilation Database for Use with Clang Tools

Usage

build_compile_commands(path = ".", debug = FALSE)

Arguments

path

The path of the package

debug

Set to TRUE to get verbose output

Value

This function invisibly returns TRUE on success.

Examples

## Not run: 
build_compile_commands(path = ".")

## End(Not run)

Determine Path to Makevars File and Check if it Already Exists

Description

Determine Path to Makevars File and Check if it Already Exists

Usage

get_makevars(path = ".")

Arguments

path

The path of the package

Value

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

Description

Check Whether a Clang Toolchain is Being Used

Usage

has_clang()

Value

A logical indicating whether clang is used as a compiler


Checks that We are on a Unix Platform

Description

Checks that We are on a Unix Platform

Usage

is_unix()

Value

A logical indicating whether we are on a Unix platform