Skip to content

Commit

Permalink
White list PopOS with isystem
Browse files Browse the repository at this point in the history
  • Loading branch information
mattfidler committed Nov 21, 2024
1 parent 0525f56 commit 05f698d
Show file tree
Hide file tree
Showing 2 changed files with 19 additions and 12 deletions.
30 changes: 18 additions & 12 deletions inst/tools/workaround.R
Original file line number Diff line number Diff line change
Expand Up @@ -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)) {
Expand Down
1 change: 1 addition & 0 deletions man/reexports.Rd

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

0 comments on commit 05f698d

Please sign in to comment.