diff --git a/.github/workflows/R-CMD-check.yaml b/.github/workflows/R-CMD-check.yaml index a3d89ced..17d90dbe 100644 --- a/.github/workflows/R-CMD-check.yaml +++ b/.github/workflows/R-CMD-check.yaml @@ -12,7 +12,7 @@ jobs: name: ${{ matrix.config.os }} (${{ matrix.config.r }}) - if: "contains(github.event.head_commit.message, '[run ci]') || (github.ref == 'refs/heads/master' || github.ref == 'refs/heads/develop')" + if: "contains(github.event.head_commit.message, '[run ci]') || (github.ref == 'refs/heads/master' || github.ref == 'refs/heads/develop') || github.event.pull_request" strategy: fail-fast: false diff --git a/.github/workflows/test-coverage.yaml b/.github/workflows/test-coverage.yaml index 952a4f78..ddaeb214 100644 --- a/.github/workflows/test-coverage.yaml +++ b/.github/workflows/test-coverage.yaml @@ -9,7 +9,7 @@ name: test-coverage jobs: test-coverage: runs-on: ubuntu-latest - if: "contains(github.event.head_commit.message, '[run ci]') || (github.ref == 'refs/heads/master' || github.ref == 'refs/heads/develop')" + if: "contains(github.event.head_commit.message, '[run ci]') || (github.ref == 'refs/heads/master' || github.ref == 'refs/heads/develop') || github.event.pull_request" env: GITHUB_PAT: ${{ secrets.GITHUB_TOKEN }} diff --git a/DESCRIPTION b/DESCRIPTION index 5a83f474..fdb6c78d 100644 --- a/DESCRIPTION +++ b/DESCRIPTION @@ -1,11 +1,10 @@ Package: DAISIE Type: Package Title: Dynamical Assembly of Islands by Speciation, Immigration and Extinction -Version: 4.3.1 -Date: 2023-02-10 +Version: 4.3.2 +Date: 2023-02-24 Depends: R (>= 4.1.0) biocViews: -SystemRequirements: C++17 Imports: deSolve, graphics, @@ -112,6 +111,7 @@ Description: Simulates and computes the (maximum) likelihood of a dynamical extinction. See e.g. Valente et al. 2015. Ecology Letters 18: 844-852, . NeedsCompilation: yes +SystemRequirements: C++14 Encoding: UTF-8 VignetteBuilder: knitr URL: https://github.com/rsetienne/DAISIE diff --git a/NAMESPACE b/NAMESPACE index 3cf5beee..9f793cfe 100644 --- a/NAMESPACE +++ b/NAMESPACE @@ -42,7 +42,6 @@ export(create_pars) export(create_trait_pars) export(create_trait_pars_2K) export(daisie_odeint_cs) -export(daisie_odeint_iw) import(Rcpp) importFrom(doParallel,registerDoParallel) importFrom(foreach,"%dopar%") diff --git a/NEWS.md b/NEWS.md index 629655bd..fd38c444 100644 --- a/NEWS.md +++ b/NEWS.md @@ -1,3 +1,10 @@ +# DAISIE 4.3.2 + +* Apply CRAN suggested fixes to clang16 issues with deprecated C++ functions included the Boost library, which are used in some of the stepper functions. + * Add config.h in a macro, checking for, and setting, `_HAS_AUTO_PTR_ETC` and `BOOST_NO_AUTO_PTR`. + * Change SystemRequirements in DESCRIPTION from C++17 to C++14. +This same fix was applied in package `'DDD'` version 5.2.1. + # DAISIE 4.3.1 * Fix issue that prevented 'covr' from running correctly. diff --git a/R/RcppExports.R b/R/RcppExports.R index de991b04..5d754b1e 100644 --- a/R/RcppExports.R +++ b/R/RcppExports.R @@ -9,9 +9,6 @@ NULL #' @name daisie_odeint_cs NULL -#' @export daisie_odeint_iw -NULL - #' Driver for the boost::odeint solver #' #' @name daisie_odeint_iw diff --git a/src/DAISIE_CS.cpp b/src/DAISIE_CS.cpp index 933f3f0f..332f9957 100644 --- a/src/DAISIE_CS.cpp +++ b/src/DAISIE_CS.cpp @@ -1,10 +1,10 @@ -// [[Rcpp::plugins(cpp17)]] +// [[Rcpp::plugins(cpp14)]] // [[Rcpp::depends(BH)]] //' @export daisie_odeint_cs - +#include "config.h" #include "DAISIE_odeint.h" using namespace daisie_odeint::jacobian_policy; diff --git a/src/DAISIE_IW.cpp b/src/DAISIE_IW.cpp index 6075b35b..1c74694e 100644 --- a/src/DAISIE_IW.cpp +++ b/src/DAISIE_IW.cpp @@ -1,9 +1,8 @@ //' @export daisie_odeint_iw - -// [[Rcpp::plugins(cpp17)]] +// [[Rcpp::plugins(cpp14)]] // [[Rcpp::plugins(openmp)]] -// [[Rcpp::depends(RcppEigen)]] +#include "config.h" #include "DAISIE_odeint.h" #define EIGEN_USE_THREADS #include diff --git a/src/DAISIE_odeint.h b/src/DAISIE_odeint.h index af595928..bb84dd62 100644 --- a/src/DAISIE_odeint.h +++ b/src/DAISIE_odeint.h @@ -1,12 +1,15 @@ +// [[Rcpp::plugins(cpp14)]] + #pragma once #ifndef DAISIE_ODEINT_H_INCLUDED #define DAISIE_ODEINT_H_INCLUDED - +#include "config.h" #include "ublas_types.h" #include #include #include +#include using namespace Rcpp; @@ -44,7 +47,7 @@ namespace daisie_odeint { extern double abm_factor; - + template inline void do_integrate(double atol, double rtol, Rhs rhs, state_type& y, double t0, double t1) { @@ -72,7 +75,7 @@ namespace daisie_odeint { namespace jacobian_policy { - // Evaluator of the Jacobian for linear, time independent systems + // Evaluator of the Jacobian for linear, time independent systems // dxdt = Ax => Jacobian = t(A) template struct const_from_linear_rhs diff --git a/src/DAISIE_types.h b/src/DAISIE_types.h index 1f21d261..78ae8f2f 100644 --- a/src/DAISIE_types.h +++ b/src/DAISIE_types.h @@ -1,2 +1,3 @@ #pragma once +#include "config.h" #include "odeint_types.h" diff --git a/src/R_init_DAISIE.c b/src/R_init_DAISIE.c index 7dd3fcf5..e5fd4b78 100644 --- a/src/R_init_DAISIE.c +++ b/src/R_init_DAISIE.c @@ -1,3 +1,6 @@ +// [[Rcpp::plugins(cpp14)]] + +#include"config.h" #include #include #include // for NULL diff --git a/src/config.h b/src/config.h new file mode 100644 index 00000000..348a5311 --- /dev/null +++ b/src/config.h @@ -0,0 +1,22 @@ +#ifndef ODEINT_CONFIG_H_INCLUDED +#define ODEINT_CONFIG_H_INCLUDED + +// [[Rcpp::plugins(cpp14)]] + +// Special case to make use of some steppers that would include +// boost/functional.hpp +#if __cplusplus >= 201703L +#ifdef _HAS_AUTO_PTR_ETC +#undef _HAS_AUTO_PTR_ETC +#endif +#define _HAS_AUTO_PTR_ETC 0 +#endif + +// Special case to make use of some steppers that would include +// boost/get_pointer.hpp +#ifdef BOOST_NO_AUTO_PTR +#undef BOOST_NO_AUTO_PTR +#endif +#define BOOST_NO_AUTO_PTR + +#endif diff --git a/src/ublas_types.h b/src/ublas_types.h index 125cc936..750b7056 100644 --- a/src/ublas_types.h +++ b/src/ublas_types.h @@ -1,7 +1,10 @@ +// [[Rcpp::plugins(cpp14)]] + #pragma once #ifndef UBLAS_TYPES_H_INCLUDED #define UBLAS_TYPES_H_INCLUDED +#include "config.h" #include #include #include