From 3fcc7674e16813ea6c6ffffbefdd5ebb83b5ef31 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Kirill=20M=C3=BCller?= Date: Sun, 27 Apr 2025 07:37:04 +0200 Subject: [PATCH] feat: Add `Config/build/never-clean` option to never clean during build --- R/compile-dll.R | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/R/compile-dll.R b/R/compile-dll.R index 4103f87..f1e6cf7 100644 --- a/R/compile-dll.R +++ b/R/compile-dll.R @@ -209,6 +209,11 @@ needs_compile <- function(path = ".") { # Does the package need a clean compile? # (i.e. is there a header or Makevars newer than the dll) needs_clean <- function(path = ".") { + never_clean <- get_desc_config_flag(path, "never-clean") + if (isTRUE(never_clean)) { + return(FALSE) + } + headers <- mtime(headers(path)) # no headers, so never needs clean compile if (is.null(headers)) {