Skip to content

Commit

Permalink
[OPTIMIZE] Set compiler-flags 🚀
Browse files Browse the repository at this point in the history
* Created src/Makevars and set compiler-flags.

No clue if it actually works. See https://stackoverflow.com/questions/32586455/how-to-change-and-set-rcpp-compile-arguments
  • Loading branch information
serkor1 committed Dec 13, 2024
1 parent c5f672f commit c63e9a4
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 3 deletions.
6 changes: 3 additions & 3 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -31,13 +31,13 @@ document:

build: document
@echo "Installing {$(PKGNAME)}"
R CMD build .
R CMD INSTALL $(TARBALL)
R CMD build . --clean
R CMD INSTALL --clean $(TARBALL)
rm -f $(TARBALL)

check: document
@echo "Checking {$(PKGNAME)}"
R CMD build .
R CMD build . --clean
R CMD check $(TARBALL)
rm -f $(TARBALL)
rm -rf $(PKGNAME).Rcheck
Expand Down
6 changes: 6 additions & 0 deletions src/Makevars
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
PKG_CXXFLAGS = -O3 -ffast-math
ifdef __aarch64__
PKG_CXXFLAGS += -march=armv8-a
else
PKG_CXXFLAGS += -march=native
endif

0 comments on commit c63e9a4

Please sign in to comment.