- Add 'SystemRequirements: C++11' to your DESCRIPTION file, This was all that was needed! Thanks Kevin!
Cheers, Richel Bilderbeek On 16 March 2016 19:31:08 +01:00, Kevin Ushey <kevinus...@gmail.com> wrote: > It sounds like you just need to declare that your package depends on > C++11 in the standard way: > > - Add 'SystemRequirements: C++11' to your DESCRIPTION file, > - Create files at 'src/Makevars[.win]', and make sure you have CXX_STD = CXX11 > > This is documented in more detail in R-exts: see > <https://cran.r-project.org/doc/manuals/r-release/R-exts.html#Using-C_002b_002b11-code> > > Thanks, > Kevin > > On Wed, Mar 16, 2016 at 11:25 AM, Richel Bilderbeek > <<ric...@richelbilderbeek.nl>> wrote: > > > I am working on a minimal example of using Rcpp11 and Travis CI, which I > > keep at this GiHub: > > <https://github.com/richelbilderbeek/travis_qmake_gcc_cpp11_rcpp> . It has > > one > > function that is labeled 'noexcept', thus C++11. > > > > I can compile and run the C++11 code from a Qt Creator project file (called > > 'domagic.pro'), > > I can successfully create the 'domagic' package that uses an R function to > > call the C++11 function. > > > > Because Travis CI does not automate multiple languages yet, I want it to > > check the R package automatically. I got this working for C++98 (at this > > GitHub: <https://github.com/richelbilderbeek/travis_qmake_gcc_cpp98_rcpp> ). > > > > For C++11 there is one extra step: one has to run the following line in > > RStudio (a tip from Dirk Edelbuettel): > > Sys.setenv("PKG_CXXFLAGS"="-std=c++11") > > When I then run 'devtools::check()' on the package, everything works without > > notes/warnings/errors. > > > > But how to let Travis CI do the same? I tried to add it to the .travis.yml, > > but this was more guessing than first reading how to do so. Also adding > > 'Rcpp11' to the package DESCRIPTION, adding [[Rcpp11::export]] or [[export]] > > to the C++11 function documentation are ideas that I have tried in multiple > > random ways. > > > > Can it be done? Are there suggestions? > > > > Thanks in advance, Richel Bilderbeek > > > > _______________________________________________ > > Rcpp-devel mailing list > > Rcpp-devel@lists.r-forge.r-project.org > > <https://lists.r-forge.r-project.org/cgi-bin/mailman/listinfo/rcpp-devel> > >
_______________________________________________ Rcpp-devel mailing list Rcpp-devel@lists.r-forge.r-project.org https://lists.r-forge.r-project.org/cgi-bin/mailman/listinfo/rcpp-devel