From 25b1e5f1b7c5f8855578e051b345517aad348f6b Mon Sep 17 00:00:00 2001 From: bjaeger Date: Thu, 12 Oct 2023 08:49:44 -0400 Subject: [PATCH] cpp14 checks --- CRAN-SUBMISSION | 4 ++-- src/AAA_check_cpp_version.cpp | 5 +++++ src/Makevars | 1 - src/Makevars.win | 2 +- 4 files changed, 8 insertions(+), 4 deletions(-) create mode 100644 src/AAA_check_cpp_version.cpp diff --git a/CRAN-SUBMISSION b/CRAN-SUBMISSION index e50ee393..2b91ad70 100644 --- a/CRAN-SUBMISSION +++ b/CRAN-SUBMISSION @@ -1,3 +1,3 @@ Version: 0.1.0 -Date: 2023-10-12 00:32:23 UTC -SHA: 65cf27efc6b936f9a599c679fd833a142c6d6a4d +Date: 2023-10-12 03:47:48 UTC +SHA: 8504a3cc7b87142ebabef93939a8812883e14725 diff --git a/src/AAA_check_cpp_version.cpp b/src/AAA_check_cpp_version.cpp new file mode 100644 index 00000000..d5d30887 --- /dev/null +++ b/src/AAA_check_cpp_version.cpp @@ -0,0 +1,5 @@ +#ifndef WIN_R_BUILD +#if __cplusplus < 201402L +#error Error: aorsf requires a C++14 compiler, e.g., gcc >= 5 or Clang >= 3.4. You probably have to update your C++ compiler. +#endif +#endif diff --git a/src/Makevars b/src/Makevars index 6660c7f9..3a7f8ac9 100644 --- a/src/Makevars +++ b/src/Makevars @@ -1,3 +1,2 @@ -CXX_STD = CXX14 PKG_CXXFLAGS = $(SHLIB_OPENMP_CXXFLAGS) PKG_LIBS = $(SHLIB_OPENMP_CXXFLAGS) $(LAPACK_LIBS) $(BLAS_LIBS) $(FLIBS) diff --git a/src/Makevars.win b/src/Makevars.win index 6660c7f9..72930746 100644 --- a/src/Makevars.win +++ b/src/Makevars.win @@ -1,3 +1,3 @@ -CXX_STD = CXX14 +PKG_CPPFLAGS = -DWIN_R_BUILD PKG_CXXFLAGS = $(SHLIB_OPENMP_CXXFLAGS) PKG_LIBS = $(SHLIB_OPENMP_CXXFLAGS) $(LAPACK_LIBS) $(BLAS_LIBS) $(FLIBS)