with_debug

0th

Percentile

Temporarily set debugging compilation flags.

Temporarily set debugging compilation flags.

Usage
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 -Og to all flags (Adding FFLAGS and FCFLAGS

See Also

Other debugging flags: compiler_flags

Aliases
  • with_debug
Examples
# NOT RUN {
flags <- names(compiler_flags(TRUE))
with_debug(Sys.getenv(flags))

# }
# NOT RUN {
install("mypkg")
with_debug(install("mypkg"))
# }
Documentation reproduced from package pkgbuild, version 1.0.0, License: GPL-3

Community examples

Looks like there are no examples yet.