src/TMB/compile.R

tmb_name <- "unmarked_TMBExports"
tmb_flags <- commandArgs(trailingOnly = TRUE)

if(file.exists(paste0(tmb_name, ".cpp"))) {
  if(length(tmb_flags) == 0) tmb_flags <- ""
  TMB::compile(file = paste0(tmb_name, ".cpp"),
               #PKG_CXXFLAGS = tmb_flags,
               #openmp = TRUE,
               openmp = FALSE,
               safebounds = FALSE, safeunload = FALSE)
  file.copy(from = paste0(tmb_name, .Platform$dynlib.ext),
            to = "..", overwrite = TRUE)
}

# cleanup done in ../Makevars[.win]
rbchan/unmarked documentation built on April 3, 2024, 10:11 p.m.