[Rcpp-devel] Rcpp::depends not picking up inst/include/

Thell Fowler tbfowler4 at gmail.com
Fri Nov 30 19:08:15 CET 2012

Hi all!

I've been trying to determine why the inst/include/ path is not being added
to the compile flags when using Rcpp::depends in a simple sourced .cpp
which depends on a .hpp of my package.

Looking through the source of ./pkg/Rcpp/R/Attributes.R contains it seems
that a depended upon package _must_ define a plugin if the inst/include is
to get appended to the sourced files build environment.

Does it make sense to require this of the package when the package path
could be checked for the existence of inst/include and just append it?

My use case is that of a header only package providing Rcpp::interface(cpp)
only where my package DESCRIPTION already contains the depends providing
everything outside of the wrap and as forwarders. So while building the
package does require makevars(.win) info the sourceCPP source code doesn't
because sourceCPP does that for the user.

It would be nice to be able to simply

include <mypackage.h>

without needing to provide the plugin for such a seemingly simple case.

What do you think?  Harder than I'm imaging and I'm being myopic or is this
a worthwhile change for ease of use?

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.r-forge.r-project.org/pipermail/rcpp-devel/attachments/20121130/ad9c0fb4/attachment.html>

More information about the Rcpp-devel mailing list