Skip to content

Commit

Permalink
Merge pull request #95 from hsbadr/fix/includes
Browse files Browse the repository at this point in the history
`rstan_config`: Fix includes
  • Loading branch information
jgabry authored Apr 5, 2022
2 parents 025c34a + 800f3ca commit 413dc79
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion R/rstan_config.R
Original file line number Diff line number Diff line change
Expand Up @@ -185,7 +185,9 @@ rstan_config <- function(pkgdir = ".") {
}
stanc_ret <- rstan::stanc(file_name, allow_undefined = TRUE,
obfuscate_model_name = FALSE,
isystem = file.path(pkgdir, "inst", "stan"))
isystem = c(dirname(file_name), getwd(),
file.path(pkgdir, "inst", "stan"),
file.path(pkgdir, "inst", "include")))
only_functions <- grepl("functions[[:space:]]*\\{", stanc_ret$model_code) &
!grepl("data[[:space:]]*\\{", stanc_ret$model_code) &
!grepl("parameters[[:space:]]*\\{", stanc_ret$model_code) &
Expand Down

0 comments on commit 413dc79

Please sign in to comment.