I am maintaining a package that depends on C++14 features. I tried to compile the package with debug flags, but noticed that pkgbuild::with_debug(devtools::load_all()) had no effect on the optimization level. After some digging, I found that withr::with_makevars(c(CXX14FLAGS = "-Wall -g -O0", devtools::load_all()) has the desired behavior.
As far as I can see, the problem comes from the fact that pkgbuilddefines the compiler flags only for C++11.
Would it be possible to add a line for C++14 (and newer versions)?
Hi,
I am maintaining a package that depends on C++14 features. I tried to compile the package with debug flags, but noticed that
pkgbuild::with_debug(devtools::load_all())
had no effect on the optimization level. After some digging, I found thatwithr::with_makevars(c(CXX14FLAGS = "-Wall -g -O0", devtools::load_all())
has the desired behavior.As far as I can see, the problem comes from the fact that
pkgbuild
defines the compiler flags only for C++11.Would it be possible to add a line for C++14 (and newer versions)?
Best Regards, Constantin