|
1 | 1 |
|
| 2 | +# defualt compiler unset |
| 3 | +define(COMPILER = "") |
| 4 | + |
2 | 5 | # check whether user has Makevars file that might cause trouble
|
3 | 6 | makevars <- Sys.getenv("R_MAKEVARS_USER", unset = "~/.R/Makevars")
|
4 | 7 | if (file.exists(makevars)) {
|
@@ -29,16 +32,14 @@ candidates <- c("CXX11", "CXX1X", "CXX")
|
29 | 32 | for (candidate in candidates) {
|
30 | 33 | value <- r_cmd_config(candidate)
|
31 | 34 | if (!is.null(value)) {
|
| 35 | + if (any(grepl("icpc", value))) { |
| 36 | + define(COMPILER = "icc") |
| 37 | + } |
32 | 38 | cxx <- candidate
|
33 | 39 | break
|
34 | 40 | }
|
35 | 41 | }
|
36 | 42 |
|
37 |
| -# Check for the intel compiler |
38 |
| -if (any(grepl("icpc", cxx, fixed = TRUE))) { |
39 |
| - define(COMPILER = "icpc") |
40 |
| -} |
41 |
| - |
42 | 43 | # work around issue with '-Werror=format-security' being specified without
|
43 | 44 | # a prior '-Wformat', which makes gcc angry
|
44 | 45 | cxxflags <- read_r_config(sprintf("%sFLAGS", cxx), envir = NULL)[[1]]
|
@@ -121,7 +122,6 @@ if (getRversion() < "4.0") {
|
121 | 122 | }
|
122 | 123 |
|
123 | 124 | # on Solaris, check if we're using gcc or g++
|
124 |
| -define(COMPILER = "") |
125 | 125 | if (Sys.info()[["sysname"]] == "SunOS") {
|
126 | 126 | cxx <- r_cmd_config("CXX")
|
127 | 127 | version <- system(paste(cxx, "--version"), intern = TRUE)
|
|
0 commit comments