[Rcpp-devel] Using CMakeLists.txt

Dirk Eddelbuettel edd at debian.org
Tue Mar 5 22:56:25 CET 2013

On 5 March 2013 at 15:44, Richard Downe wrote:
| What I've been doing the past couple years, which has worked extremely 
| well, is to use a configure script (I've used perl because it allows me 
| to do a bunch of other build-time processing that's specific to my 
| package, but bash would work fine as well).
| All you need (for perl) is:
| #!/usr/bin/perl
| chdir "src/";
| system("cmake .");
| chdir "..";
| exit(0);
| The end result is that R CMD INSTALL [your package] finds an up to date 
| makefile in src, but otherwise runs conventionally, and your package 
| gets built and installed properly.

Etienne was (very correctly) alluding to the fact the _creating your own
src/Makefile is strongly discouraged_ as e.g. repeatedly stated by Simon and
others on r-devel or here.  R's ability produce 32 and 64 bit binaries on the
OSs that support it depends criticially on its ability to write its own
Makefile, based on its stubs and the user's Makevars.

Did you by chance mean Makevars here?  Otherwise the trick is fine but for
CRAN I would expect to be met with, ahem, criticism.


Dirk Eddelbuettel | edd at debian.org | http://dirk.eddelbuettel.com  

More information about the Rcpp-devel mailing list