Skip to content

Commit

Permalink
don't fixup CC / CXX11 for R 4.2.0 on Windows
Browse files Browse the repository at this point in the history
  • Loading branch information
kevinushey committed Dec 22, 2021
1 parent 577c920 commit ad65ac4
Showing 1 changed file with 10 additions and 2 deletions.
12 changes: 10 additions & 2 deletions tools/config/configure.R
Original file line number Diff line number Diff line change
Expand Up @@ -90,8 +90,16 @@ db <- configure_database()
info <- as.list(Sys.info())
if (info[["sysname"]] == "Windows") {

cygpath <- nzchar(Sys.which("cygpath"))
fmt <- if (cygpath) "$(shell cygpath -m \"%s\")" else "%s"
# for older versions of R, we need to resolve the
# 'true' path to the C / C++ compiler; we do so
# via the cygpath utility here
fmt <- if (getRversion() < "4.2.0") {
cygpath <- nzchar(Sys.which("cygpath"))
if (cygpath) "$(shell cygpath -m \"%s\")" else "%s"
} else {
"%s"
}

define(
WINDOWS_CC = sprintf(fmt, db$CC),
WINDOWS_CXX11 = sprintf(fmt, db$CXX11)
Expand Down

0 comments on commit ad65ac4

Please sign in to comment.