Some functions in my package work much faster using C ++ 11 containers, but CRAN does not accept my package using both $(SHLIB_OPENMP_CXXFLAGS) and $(CXX1XSTD) , because it does not compile on Solaris (or other lower platforms ) The CRAN recommendation was to write a script configuration, but I think it would be too laborious for me to learn, and unnecessarily complicate my code for platforms that few people use.
At the moment, I just commented on all the C ++ 11 code and removed $(CXX1XSTD) from Makevars to represent CRAN. This is a bad job, and I would rather detect CRAN in Makevars and place the housing, so I do not need to support the CRAN plug for each version.
I'm still checking if C ++ 11 is available, but it's just a combination of the C ++ 11 and OpenMP flags in Makevars, which is a sticking point in Solaris with CRAN views. I feel that there must be a trivial path around this.
Is there an environment variable that I should use to check whether CRAN checks my package and with what I can check in Makevars ? I searched the R code base and read the R Internals and Writing R Extensions, although I can't say that I know them by heart, which some CRAN-enabled expect. There are environment variables that CRAN probably sets, but I expect that testing something like _R_CHECK_CRAN_INCOMING_=TRUE will cause support for the maintainers to fail.
I donβt think that the "if solaris" test in Makevars will be sufficient: the presence of both C ++ 11 and OpenMP flags together is not allowed, because they can potentially not work on platforms used even less often than Solaris.
Maybe I'm just getting this wrong.
source share