On 1 October 2013 at 22:37, Gad Abraham wrote: | Hi, | | I've started using Rcpp recently and it's great!
Cool! | Is there a list of which of the Makevars variables are evaluated, i.e., ones | that I can declare as backticks for conditional results. For example, I'd like | to be able to declare an environment variable during package installation, | e.g.: | | USE_OPENCL=yes R CMD INSTALL package | | | but neither | PKG_CPPFLAGS += `if ! [ -z $(USE_OPENCL) ]; then echo '-DUSE_OPENCL'; fi` | nor | PKG_CXXFLAGS += `if ! [ -z $(USE_OPENCL) ]; then echo '-DUSE_OPENCL'; fi` | | seems to work. That seems a little fragile. I would try this in src/Makevars, which use the Make language (which also inherits environment variables as I dimly recall) but can also execute shell snippets. Or you try to set up a local plugin for use by Rcpp Attributes. Then you get a hook into R code where you can query the (shell) environment variables and act accordingly. We now have plugins for c++11 -- and as of the Rcpp 0.10.5 release from this weekend also for openmp. Dirk -- Dirk Eddelbuettel | e...@debian.org | http://dirk.eddelbuettel.com _______________________________________________ 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