File tree Expand file tree Collapse file tree 1 file changed +23
-0
lines changed
Expand file tree Collapse file tree 1 file changed +23
-0
lines changed Original file line number Diff line number Diff line change 11
2+ # check whether user has Makevars file that might cause trouble
3+ makevars <- Sys.getenv(" R_MAKEVARS_USER" , unset = " ~/.R/Makevars" )
4+ if (file.exists(makevars )) {
5+ contents <- readLines(makevars , warn = FALSE )
6+ pattern <- " ^(PKG_CPPFLAGS|PKG_CXXFLAGS)\\ s*="
7+ bad <- grep(pattern , contents , perl = TRUE , value = TRUE )
8+ if (length(bad )) {
9+
10+ text <- c(
11+ " " ,
12+ sprintf(" NOTE: '%s' contains variable declarations incompatible with RcppParallel:" , makevars ),
13+ " " ,
14+ paste0(" \t " , bad ),
15+ " " ,
16+ " Makevars variables prefixed with 'PKG_' should be considered reserved for use by R packages." ,
17+ " "
18+ )
19+
20+ writeLines(text , con = stdout())
21+
22+ }
23+ }
24+
225# Figure out the appropriate CXX prefix for the current
326# version of R + configuration.
427cxx <- NULL
You can’t perform that action at this time.
0 commit comments