Re: [Rcpp-devel] Add include path to sourceCpp

2017-02-06 Thread Tim Keitt
http://www.keittlab.org/ On Sat, Feb 4, 2017 at 12:17 PM, Dirk Eddelbuettel wrote: > > On 4 February 2017 at 11:58, Tim Keitt wrote: > | Thanks. > | > | Here's what I came up with: > | > | Sys.setenv(R_TESTS = "") > | > | wd = getwd() > | wd = sub(".tests.testthat$", "", wd) > | ipath1 = file.pa

Re: [Rcpp-devel] Add include path to sourceCpp

2017-02-04 Thread Dirk Eddelbuettel
On 4 February 2017 at 11:58, Tim Keitt wrote: | Thanks. | | Here's what I came up with: | | Sys.setenv(R_TESTS = "") | | wd = getwd() | wd = sub(".tests.testthat$", "", wd) | ipath1 = file.path(wd, "inst", "include") | ipath2 = file.path(wd, "include") | Sys.setenv(PKG_CXXFLAGS = paste(paste0("

Re: [Rcpp-devel] Add include path to sourceCpp

2017-02-04 Thread Tim Keitt
Thanks. Here's what I came up with: Sys.setenv(R_TESTS = "") wd = getwd() wd = sub(".tests.testthat$", "", wd) ipath1 = file.path(wd, "inst", "include") ipath2 = file.path(wd, "include") Sys.setenv(PKG_CXXFLAGS = paste(paste0("-I", ipath1), paste0("-I", ipath2))) That works sometimes, but not a

Re: [Rcpp-devel] Add include path to sourceCpp

2017-02-01 Thread Dirk Eddelbuettel
On 1 February 2017 at 13:01, Tim Keitt wrote: | Is there a way to add an additional include path when calling sourceCpp? I am | trying to get it to find "inst/include" in my package because I am calling | sourceCpp during testing with testthat. Sys.setenv() on the variables make and everything it

Re: [Rcpp-devel] Add include path to sourceCpp

2017-02-01 Thread Qiang Kou
Hi, Tim, I think JJ gave the answer on stackoverflow, you can find it from [1]. You can also try to Sys.setenv("PKG_CXXFLAGS"="-I/path/to/header") before the sourceCpp. Best wishes, KK [1] http://stackoverflow.com/a/13996107/2168696 On Wed, Feb 1, 2017 at 2:01 PM, Tim Keitt wrote: > Is ther

[Rcpp-devel] Add include path to sourceCpp

2017-02-01 Thread Tim Keitt
Is there a way to add an additional include path when calling sourceCpp? I am trying to get it to find "inst/include" in my package because I am calling sourceCpp during testing with testthat. THK http://www.keittlab.org/ ___ Rcpp-devel mailing list Rcp