From a8fa4d318f46a877f31bf6d64339e7e81cd01561 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?G=C3=A1bor=20Cs=C3=A1rdi?= Date: Mon, 4 Dec 2023 11:22:50 +0100 Subject: [PATCH] Require C++17 on macOS To be able to install the package on older R versions, e.g. R 3.6 to R 4.2, which default to C++14 or C++11. This is surely ok for macOS systems since Big Sur. --- tools/config/configure.R | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tools/config/configure.R b/tools/config/configure.R index cef801f..a76102b 100644 --- a/tools/config/configure.R +++ b/tools/config/configure.R @@ -182,7 +182,7 @@ for (src_ in gle_cc) { pkg_sources <- sort(dir("./src", ".cpp$|.c$"), decreasing = TRUE) # compiler flags -cxxflags <- "" +cxxflags <- if (mac) "-std=gnu++17" else "" fix_flags <- function(x) { x <- gsub("-Wno-float-conversion ", "", x, fixed = TRUE)