Skip to content

Commit

Permalink
Merge pull request #33 from l-ramirez-lopez/2.2
Browse files Browse the repository at this point in the history
2.2: build(gfortran)
  • Loading branch information
l-ramirez-lopez authored Mar 19, 2022
2 parents 9f4e132 + cdc2851 commit a0d15b1
Show file tree
Hide file tree
Showing 4 changed files with 29 additions and 16 deletions.
2 changes: 1 addition & 1 deletion DESCRIPTION
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ Package: resemble
Type: Package
Title: Memory-Based Learning in Spectral Chemometrics
Version: 2.2.1
Date: 2022-01-17
Date: 2022-03-17
Author: Leonardo Ramirez-Lopez [aut, cre],
Antoine Stevens [aut, ctb],
Claudio Orellano [ctb],
Expand Down
9 changes: 8 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@

<!-- badges: end -->

_Last update: 16.03.2022_
_Last update: 20.03.2022_

<em><p align="right"> Think Globally, Fit Locally (Saul and Roweis, 2003) </p></em>

Expand Down Expand Up @@ -93,6 +93,13 @@ using [`devtools`](https://CRAN.R-project.org/package=devtools):
devtools::install_github("l-ramirez-lopez/resemble")
```

NOTE: in some MAC Os it is still recommended to install `gfortran` and `clang`
from [here](https://cran.r-project.org/bin/macosx/tools/). Even for R >= 4.0.
For more info, check this [issue](https://github.com/tidyverts/fable/issues/193).




## Example

After installing `resemble` you should be also able to run the following lines:
Expand Down
21 changes: 12 additions & 9 deletions src/Makevars
Original file line number Diff line number Diff line change
@@ -1,15 +1,18 @@
CXX_STD = CXX11
## Use the R_HOME indirection to support installations of multiple R version
## PKG_LIBS = `$(R_HOME)/bin/Rscript -e "Rcpp:::LdFlags()"` $(LAPACK_LIBS) $(BLAS_LIBS) $(FLIBS) $(SHLIB_OPENMP_CXXFLAGS)
PKG_LIBS = `$(R_HOME)/bin/Rscript -e "Rcpp:::LdFlags()"` $(LAPACK_LIBS) $(BLAS_LIBS) $(SHLIB_OPENMP_CXXFLAGS)
# deprecated: PKG_LIBS = `$(R_HOME)/bin/Rscript -e "Rcpp:::LdFlags()"` $(LAPACK_LIBS) $(BLAS_LIBS) $(SHLIB_OPENMP_CXXFLAGS)
PKG_LIBS = $(LAPACK_LIBS) $(BLAS_LIBS) $(FLIBS) $(SHLIB_OPENMP_CXXFLAGS)

PKG_CPPFLAGS = -I../inst/include -I.

PKG_CXXFLAGS = $(SHLIB_OPENMP_CXXFLAGS)
CXX_STD = CXX11

F77 = $(GCCBASE)/bin/gfortran
FC = $F77
FLIBS = -L$(GCCBASE)/bin/gfortran
## WARNING: although the following lines trip symbols to make the installation

#F77 = $(GCCBASE)/bin/gfortran
#FC = $F77
#FLIBS = -L$(GCCBASE)/bin/gfortran

## WARNING: although the following lines strip symbols to make the installation
## smaller, CRAN policies do not allow this
#strippedLib: $(SHLIB)
# if test -e "/usr/bin/strip" & test -e "/bin/uname" & [[ `uname` == "Linux" ]]; then /usr/bin/strip --strip-debug $(SHLIB); fi
#.phony: strippedLib
#.phony: strippedLib
13 changes: 8 additions & 5 deletions src/Makevars.win
Original file line number Diff line number Diff line change
@@ -1,8 +1,11 @@
CXX_STD = CXX11

## This assumes that we can call Rscript to ask Rcpp about its locations
## Use the R_HOME indirection to support installations of multiple R version
PKG_LIBS = $(shell "${R_HOME}/bin${R_ARCH_BIN}/Rscript.exe" -e "Rcpp:::LdFlags()")
PKG_LIBS = $(LAPACK_LIBS) $(BLAS_LIBS) $(FLIBS) $(SHLIB_OPENMP_CXXFLAGS)

PKG_CPPFLAGS = -I../inst/include -I.
PKG_LIBS += $(LAPACK_LIBS) $(BLAS_LIBS) $(FLIBS) $(SHLIB_OPENMP_CFLAGS)
PKG_CXXFLAGS = $(SHLIB_OPENMP_CXXFLAGS)

## WARNING: although the following lines strip symbols to make the installation
## smaller, CRAN policies do not allow this
#strippedLib: $(SHLIB)
# if test -e "/usr/bin/strip" & test -e "/bin/uname" & [[ `uname` == "Linux" ]]; then /usr/bin/strip --strip-debug $(SHLIB); fi
#.phony: strippedLib

0 comments on commit a0d15b1

Please sign in to comment.