with_debug: Temporarily set debugging compilation flags.

Description Usage Arguments See Also Examples

View source: R/with-debug.R

Description

Temporarily set debugging compilation flags.

Usage

1
2
3
4
5
6
7
8
with_debug(
  code,
  CFLAGS = NULL,
  CXXFLAGS = NULL,
  FFLAGS = NULL,
  FCFLAGS = NULL,
  debug = TRUE
)

Arguments

code

to execute.

CFLAGS

flags for compiling C code

CXXFLAGS

flags for compiling C++ code

FFLAGS

flags for compiling Fortran code.

FCFLAGS

flags for Fortran 9x code.

debug

If TRUE adds -g -O0 to all flags (Adding FFLAGS and FCFLAGS

See Also

Other debugging flags: compiler_flags()

Examples

1
2
3
4
5
6
7
8
flags <- names(compiler_flags(TRUE))
with_debug(Sys.getenv(flags))

## Not run: 
install("mypkg")
with_debug(install("mypkg"))

## End(Not run)

pkgbuild documentation built on Dec. 16, 2020, 1:08 a.m.