C++14 standard requested but CXX14 is not defined (again, with rstantools 2.0.0)

I tried to port package dmenne/breathteststan (github, CRAN) to use the stucture of rstantools 2.0.0. Works fine in my local Windows build, but gives the well known C++14 standard requested but CXX14 is not defined on r-hub (https://builder.r-hub.io/status/breathteststan_0.4.7.9000.tar.gz-be031122f1124ebc8ae7c363a5f2d0ca). r-hub Mac build is fine.

Since makevars.xxx is now generated by rstanstools, I don’t want to change it using one of the old methods. Any suggestion?

It appears that R-hub does not define CXX14 like winbuilder does. But in my experience, R-hub should be fine for testing of any non-Windows configuration.

Unrelated to your problem, but since I had a look at your repository, it seems to me that you can avoid having the *.h files and the RcppExports.cpp in the repository, as they are automatically generated by rstantools::rstan_config().

1 Like

Thanks, you are right. I kept these, because I was once flamed for removing the man-files which I believe are also not required. And (hint, hint @bgoodri ) I thought that these would have been put into gitignore if they were not required, but gitignore is almost empty. And .Rbuildignore?

D

When I switched to rstantools 2.0.0, this is what I added to .Rbuildignore:

rcppExports.cpp
stanExports_*

and to .gitignore:

*.cc
*.cpp
*.h

Should we just have rstantools automatically add these to .Rbuildignore (and .gitignore if it exists)? I don’t think automating it would cause any problems anywhere. I can definitely do this when I have a chance, or if you (@mcol) or anyone else has time and wants to make a PR for this that would be great too.

Yeah

Ok I opened an issue for this https://github.com/stan-dev/rstantools/issues/65. I will definitely add this before the next release if nobody has added it before then.