R/utils.R

Defines functions inlineCxxPlugin

Documented in inlineCxxPlugin

#' Code to use the lsoda package inline. Not directly called by the user.
#' @param ... arguments
#' @keywords internal
#' @rdname plugin
inlineCxxPlugin <- function(...) {
    ismacos <- Sys.info()[["sysname"]] == "Darwin"
    openmpflag <- if (ismacos) "" else "$(SHLIB_OPENMP_CFLAGS)"
    plugin <- Rcpp::Rcpp.plugin.maker(include.before = '#include "lsoda.h"',
                                      libs = paste(openmpflag,
                                                   "$(LAPACK_LIBS) $(BLAS_LIBS) $(FLIBS)"),
                                      package = "lsoda")
    settings <- plugin()
    settings$env$PKG_CPPFLAGS <- paste("-I../inst/include", openmpflag)
    ## if (!ismacos) settings$env$USE_CXX11 <- "yes"
    settings
}

Try the lsoda package in your browser

Any scripts or data that you put into this service are public.

lsoda documentation built on June 8, 2025, 9:36 p.m.