Skip to content

Commit ad65ac4

Browse files
committed
don't fixup CC / CXX11 for R 4.2.0 on Windows
1 parent 577c920 commit ad65ac4

File tree

1 file changed

+10
-2
lines changed

1 file changed

+10
-2
lines changed

tools/config/configure.R

+10-2
Original file line numberDiff line numberDiff line change
@@ -90,8 +90,16 @@ db <- configure_database()
9090
info <- as.list(Sys.info())
9191
if (info[["sysname"]] == "Windows") {
9292

93-
cygpath <- nzchar(Sys.which("cygpath"))
94-
fmt <- if (cygpath) "$(shell cygpath -m \"%s\")" else "%s"
93+
# for older versions of R, we need to resolve the
94+
# 'true' path to the C / C++ compiler; we do so
95+
# via the cygpath utility here
96+
fmt <- if (getRversion() < "4.2.0") {
97+
cygpath <- nzchar(Sys.which("cygpath"))
98+
if (cygpath) "$(shell cygpath -m \"%s\")" else "%s"
99+
} else {
100+
"%s"
101+
}
102+
95103
define(
96104
WINDOWS_CC = sprintf(fmt, db$CC),
97105
WINDOWS_CXX11 = sprintf(fmt, db$CXX11)

0 commit comments

Comments
 (0)