Skip to content

Commit

Permalink
Debugging Rcpp build 12 dynamic makevars.
Browse files Browse the repository at this point in the history
  • Loading branch information
dereckmezquita committed Jul 8, 2024
1 parent c0aca2c commit 3dc1954
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 3 deletions.
15 changes: 12 additions & 3 deletions .github/workflows/pkgdown.yml
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,10 @@ jobs:
use-public-rspm: true
r-version: 'release'

- name: Set R_HOME
run: |
echo "R_HOME=$(R RHOME)" >> $GITHUB_ENV
- name: Install system dependencies
run: |
sudo apt-get update
Expand All @@ -39,10 +43,12 @@ jobs:
renv::install("dereckmezquita/kucoin")
shell: Rscript {0}

- name: Set up Rcpp
- name: Process Makevars.in
run: |
echo 'Sys.setenv(PKG_CPPFLAGS=paste0("-I", system.file("include", package="Rcpp")))' >> ~/.Rprofile
echo 'Sys.setenv(PKG_LIBS=paste0("-L", system.file("libs", package="Rcpp")))' >> ~/.Rprofile
PKG_CPPFLAGS=$(Rscript -e "cat(paste0(Rcpp:::CxxFlags(), ' -I', system.file('include', package = 'Rcpp')))")
PKG_LIBS=$(Rscript -e "cat(Rcpp:::LdFlags())")
sed -e "s|@PKG_CPPFLAGS@|$PKG_CPPFLAGS|" -e "s|@PKG_LIBS@|$PKG_LIBS|" src/Makevars.in > src/Makevars
cat src/Makevars
- name: Configure git
run: |
Expand All @@ -51,6 +57,9 @@ jobs:
- name: Debug C++ code
run: |
echo "R_HOME: $R_HOME"
echo "Contents of src/Makevars:"
cat src/Makevars
echo "Contents of src/bb-bollinger-bands.cpp:"
cat src/bb-bollinger-bands.cpp
echo "Contents of src/sma-simple-moving-average.cpp:"
Expand Down
2 changes: 2 additions & 0 deletions src/Makevars.in
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
PKG_CPPFLAGS = @PKG_CPPFLAGS@
PKG_LIBS = @PKG_LIBS@

0 comments on commit 3dc1954

Please sign in to comment.