Skip to content

Commit

Permalink
Only set CXX14 when needed by older R versions
Browse files Browse the repository at this point in the history
  • Loading branch information
jeroen committed Jan 4, 2024
1 parent db2edaf commit a814a3d
Show file tree
Hide file tree
Showing 4 changed files with 11 additions and 2 deletions.
4 changes: 3 additions & 1 deletion .github/workflows/R-CMD-check.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@
# Need help debugging build failures? Start at https://github.com/r-lib/actions#where-to-find-help
on:
push:
branches: [main, master]
pull_request:
branches: [main, master]

Expand All @@ -19,6 +18,9 @@ jobs:
matrix:
config:
- {os: macos-latest, r: 'release'}
- {os: windows-latest, r: '4.0'}
- {os: windows-latest, r: '4.1'}
- {os: windows-latest, r: '4.2'}
- {os: windows-latest, r: 'release'}
- {os: ubuntu-latest, r: 'devel', http-user-agent: 'release'}
- {os: ubuntu-latest, r: 'release'}
Expand Down
1 change: 1 addition & 0 deletions DESCRIPTION
Original file line number Diff line number Diff line change
Expand Up @@ -49,3 +49,4 @@ Encoding: UTF-8
LazyData: true
Roxygen: list(markdown = TRUE)
RoxygenNote: 7.2.3
Biarch: true
7 changes: 7 additions & 0 deletions configure.win
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
#!/bin/sh
MAJOR=${R_VERSION:0:3}

# Older R versions default to CXX11
if [ "$MAJOR" = "4.1" ] || [ "$MAJOR" = "4.0" ]; then
echo "CXX_STD = CXX14" >> src/Makevars.win
fi
1 change: 0 additions & 1 deletion src/Makevars.win
Original file line number Diff line number Diff line change
@@ -1,3 +1,2 @@
CXX_STD = CXX14
PKG_CXXFLAGS = $(SHLIB_OPENMP_CXXFLAGS)
PKG_LIBS = $(SHLIB_OPENMP_CXXFLAGS) $(LAPACK_LIBS) $(BLAS_LIBS) $(FLIBS)

0 comments on commit a814a3d

Please sign in to comment.