[Rcpp-devel] R CMD check not happy about -std=c++0x
francoisromain at free.fr
Tue Jan 19 08:24:30 CET 2010
This was almost working, except it was not working at all. But this does:
CLINK_CPPFLAGS=$(shell Rscript -e "Rcpp:::Cxx0xFlags()" )
On 01/18/2010 01:43 PM, Romain Francois wrote:
> With a lot of hard work this weekend, we finally found a decent
> workaround, using the CXXOPTS variable as follows:
> PKG_CPPFLAGS=$(shell Rscript -e "Rcpp:::CxxFlags()" )
> PKG_LIBS = $(shell Rscript -e "Rcpp:::LdFlags()" )
> CXXOPTS = $(shell Rscript -e "Rcpp:::Cxx0xFlags()" )
> where Rcpp:::Cxx0xFlags will be available in the next version (already
> in the development version)
> - Rcpp:::CxxFlags() will no longer include "-std=c++0x" because this is
> forbidden by R.
> - Rcpp:::Cxx0xFlags() checks which compiler is in use, and iif this is
> GCC>= 4.3 it adds "-std=c++0x"
> This makes both R CMD check and us happy.
> On 01/15/2010 08:27 AM, Romain François wrote:
>> I'm getting a warning when I try to build my CPP package that depends on
>> Rcpp and uses the classic Makevars :
>> PKG_CXXFLAGS=`Rcpp:::CxxFlags()` -I.
>> I get this warning from R CMD check :
>> * checking for portable compilation flags in Makevars ... WARNING
>> Non-portable flags in variable 'PKG_CXXFLAGS':
>> Is there a workaround ? We probably would then have to update the new
>> skeleton generator to use it.
Professional R Enthusiast
+33(0) 6 28 91 30 30
|- http://tr.im/KfKn : Rcpp 0.7.2
|- http://tr.im/JOlc : External pointers with Rcpp
`- http://tr.im/JFqa : R Journal, Volume 1/2, December 2009
More information about the Rcpp-devel