diff --git a/inst/tools/workaround.R b/inst/tools/workaround.R index f2f86c90c..b9a146c63 100644 --- a/inst/tools/workaround.R +++ b/inst/tools/workaround.R @@ -47,21 +47,27 @@ if (length(w) >= 1) { - -if (.Platform$OS.type == "windows" && !file.exists("src/Makevars.win")) { - .in <- gsub("@CXX14STD@", "-std=c++1y", .in) - file.out <- file("src/Makevars.win", "wb") - writeLines(gsub("@ISYSTEM@", "I", .in), - file.out) - close(file.out) +if (.Platform$OS.type == "windows") { + .makevars <- file("src/Makevars.win", "wb") + .i <- "I" } else { - .in <- gsub("@CXX14STD@", "-std=gnu++14", .in) - file.out <- file("src/Makevars", "wb") - writeLines(gsub("@ISYSTEM@", "isystem", .in), - file.out) - close(file.out) + .makevars <- file("src/Makevars", "wb") + if (file.exists("/etc/os-release")) { + .os <- readLines("/etc/os-release") + if (any(grepl("Pop!_OS", .os, fixed=TRUE))) { + .i <- "isystem" + } else { + .i <- "I" + } + } else { + .i <- "I" + } } +writeLines(gsub("@ISYSTEM@", .i, .in), + .makevars) +close(.makevars) + if (file.exists("man/reexports.Rd")) { l <- readLines("man/reexports.Rd") if (!any(regexpr("[\\]value", l) != -1)) { diff --git a/man/reexports.Rd b/man/reexports.Rd index 8cba3d62e..2857ff16d 100644 --- a/man/reexports.Rd +++ b/man/reexports.Rd @@ -38,3 +38,4 @@ below to see their documentation. \item{magrittr}{\code{\link[magrittr:pipe]{\%>\%}}} }} +\value{ Inherited from parent routine }