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 1
1
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
+
2
25
# Figure out the appropriate CXX prefix for the current
3
26
# version of R + configuration.
4
27
cxx <- NULL
You can’t perform that action at this time.
0 commit comments