Dear R-users,

I am currently writing an R package that contains three C++ files in the src/ source directory

When i issue a R CMD check pkge_name, all the *.cpp files in the src/ directory will be compiled through something like (seen in 00install.out file):
* Installing *source* package 'pkge_name' ...
** libs
g++ -I/usr/lib/R/include -I/usr/lib/R/include -I/usr/local/include -c file1.cpp -o file1.o g++ -I/usr/lib/R/include -I/usr/lib/R/include -I/usr/local/include -c file2.cpp -o file2.o g++ -I/usr/lib/R/include -I/usr/lib/R/include -I/usr/local/include -c file3.cpp -o file3.o


I would like to be able to choose which *.cpp files will be compiled and to exclude some *.cpp files from the compilation. This is because some of my *.cpp files contain #include instructions calling some other *.cpp file.
For example, file1.cpp would contain
#include "file2.cpp"
#include "file3.cpp"

So i would like that a call to : R CMD check pkge_name
would compile only file1.cpp and so i do not want to see the following instructions: g++ -I/usr/lib/R/include -I/usr/lib/R/include -I/usr/local/include -c file2.cpp -o file2.o g++ -I/usr/lib/R/include -I/usr/lib/R/include -I/usr/local/include -c file3.cpp -o file3.o
but only the following one:
g++ -I/usr/lib/R/include -I/usr/lib/R/include -I/usr/local/include -c file1.cpp -o file1.o
in the file 00install.out.

I tried to add some configure or Makevars.in files without success...

I hope to be clear enough.

Best regards,

Pierre Lafaye de Micheaux


--
Pierre Lafaye de Micheaux
Bureau 210, bâtiment BSHM
1251 avenue centrale BP 47
38040 GRENOBLE Cedex 09
FRANCE

Tél.: 04.76.82.58.73 / Fax: 04.76.82.56.65
[EMAIL PROTECTED]
http://www.biostatisticien.eu

______________________________________________
R-help@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.

Reply via email to