[R-pkg-devel] Conditional Makevars MacOS

2020-11-25 Thread Guido Kraemer
I need to set up different compile flags for MacOS, Linux, and Windows. 
For Windows I can just use `Makevars.win` but I cannot figure out how to 
do the same for MacOS.


Cheers,

Guido

__
R-package-devel@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-package-devel


Re: [R-pkg-devel] Conditional Makevars MacOS

2020-11-25 Thread Dr. rer. nat. Michael Thrun
Dear Guido,
i wrote an Makevars.win  and separately an Makevars file, 
in the Makevars file I set the following
PKG_LIBS = $(LAPACK_LIBS) $(BLAS_LIBS) $(FLIBS)
CXX_STD = CXX11

which works for me on MacOs well. Dont know if this answer helps you.

Best Regards

Michael Thrun
Postdoctoral Scholar
Databionics AG,
Mathematics and Computer Science

Philipps-Universität Marburg
Hans-Meerwein-Straße 6, 04A28
D-35032 Marburg

> On 25. Nov 2020, at 14:50, Guido Kraemer  wrote:
> 
> I need to set up different compile flags for MacOS, Linux, and Windows. For 
> Windows I can just use `Makevars.win` but I cannot figure out how to do the 
> same for MacOS.
> 
> Cheers,
> 
> Guido
> 
> __
> R-package-devel@r-project.org mailing list
> https://stat.ethz.ch/mailman/listinfo/r-package-devel


[[alternative HTML version deleted]]

__
R-package-devel@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-package-devel


Re: [R-pkg-devel] Conditional Makevars MacOS

2020-11-25 Thread Guido Kraemer

I have solved it for now using:

UNAME_S := $(shell uname -s)
ifeq ($(UNAME_S),Linux)
    PKG_CPPFLAGS=...
    PKG_LIBS=...
else
    PKG_CPPFLAGS=...
    PKG_LIBS=...
endif

But R CMD check now complains about GNU extensions.

Best,

Guido


On 11/25/20 2:50 PM, Guido Kraemer wrote:
I need to set up different compile flags for MacOS, Linux, and 
Windows. For Windows I can just use `Makevars.win` but I cannot figure 
out how to do the same for MacOS.


Cheers,

Guido

__
R-package-devel@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-package-devel


__
R-package-devel@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-package-devel


Re: [R-pkg-devel] Conditional Makevars MacOS

2020-11-25 Thread Gábor Csárdi
I am not sure if you can solve this without a configure file, which
can be a simple shell script. Here is an example, that detects a bunch
of OSes and then creates an OS-dependent Makevars file:
https://github.com/r-lib/ps/blob/master/configure

You'll probably also need configure.win if you have configure, but it
can just call configure in this case:
https://github.com/r-lib/ps/blob/master/configure.win

Gabor

On Wed, Nov 25, 2020 at 9:01 PM Guido Kraemer  wrote:
>
> I have solved it for now using:
>
> UNAME_S := $(shell uname -s)
> ifeq ($(UNAME_S),Linux)
>  PKG_CPPFLAGS=...
>  PKG_LIBS=...
> else
>  PKG_CPPFLAGS=...
>  PKG_LIBS=...
> endif
>
> But R CMD check now complains about GNU extensions.
>
> Best,
>
> Guido
>
>
> On 11/25/20 2:50 PM, Guido Kraemer wrote:
> > I need to set up different compile flags for MacOS, Linux, and
> > Windows. For Windows I can just use `Makevars.win` but I cannot figure
> > out how to do the same for MacOS.
> >
> > Cheers,
> >
> > Guido
> >
> > __
> > R-package-devel@r-project.org mailing list
> > https://stat.ethz.ch/mailman/listinfo/r-package-devel
>
> __
> R-package-devel@r-project.org mailing list
> https://stat.ethz.ch/mailman/listinfo/r-package-devel

__
R-package-devel@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-package-devel