[Rcpp-commits] r3445 - in pkg/Rcpp: . inst inst/doc inst/doc/Rcpp-FAQ

noreply at r-forge.r-project.org noreply at r-forge.r-project.org
Tue Jan 24 21:43:06 CET 2012


Author: edd
Date: 2012-01-24 21:43:06 +0100 (Tue, 24 Jan 2012)
New Revision: 3445

Modified:
   pkg/Rcpp/ChangeLog
   pkg/Rcpp/inst/NEWS
   pkg/Rcpp/inst/doc/Rcpp-FAQ/Rcpp-FAQ.Rnw
   pkg/Rcpp/inst/doc/Rcpp.bib
Log:
new Rcpp-FAQ entry
updated bib entry for Rcpp itself


Modified: pkg/Rcpp/ChangeLog
===================================================================
--- pkg/Rcpp/ChangeLog	2012-01-22 00:21:50 UTC (rev 3444)
+++ pkg/Rcpp/ChangeLog	2012-01-24 20:43:06 UTC (rev 3445)
@@ -1,7 +1,12 @@
+2012-01-24  Dirk Eddelbuettel  <edd at debian.org>
+
+	* inst/doc/Rcpp-FAQ/Rcpp-FAQ.Rnw: New FAQ entry on passing a single
+	option to g++, based on a rcpp-devel question by Whit Armstrong.
+
 2012-01-15  Romain Francois  <romain at r-enthusiasts.com>
 
-        * inst/include/Rcpp/vector/Vector.h: fixing IntegerVector(int,int), reported
-	  by Gregor Kastner on rcpp-devel
+        * inst/include/Rcpp/vector/Vector.h: fixing IntegerVector(int,int),
+	reported by Gregor Kastner on rcpp-devel
         * inst/unitTests/runit.Vector.R: regression test for the above
 
 2011-12-25  Dirk Eddelbuettel  <edd at debian.org>

Modified: pkg/Rcpp/inst/NEWS
===================================================================
--- pkg/Rcpp/inst/NEWS	2012-01-22 00:21:50 UTC (rev 3444)
+++ pkg/Rcpp/inst/NEWS	2012-01-24 20:43:06 UTC (rev 3445)
@@ -1,7 +1,11 @@
+0.9.10  2012-xx-yy
+
+    o   New Rcpp-FAQ entry on simple way to set compiler option for cxxfunction
+
 0.9.9   2012-12-25
 
     o   Reverting the 'int64' changes from release 0.9.8 which adversely
-    	affect packages using Rcpp We will re-apply the 'int64' changes in a 
+    	affect packages using Rcpp: We will re-apply the 'int64' changes in a 
 	way which should cooperate more easily with 'long' and 'unsigned long'.
 
     o   Unit test output directory fallback changed to use Rcpp.Rcheck

Modified: pkg/Rcpp/inst/doc/Rcpp-FAQ/Rcpp-FAQ.Rnw
===================================================================
--- pkg/Rcpp/inst/doc/Rcpp-FAQ/Rcpp-FAQ.Rnw	2012-01-22 00:21:50 UTC (rev 3444)
+++ pkg/Rcpp/inst/doc/Rcpp-FAQ/Rcpp-FAQ.Rnw	2012-01-24 20:43:06 UTC (rev 3445)
@@ -520,6 +520,29 @@
 Here the \pkg{Rcpp} function \code{Rcpp.plugin.maker} is used to create a
 plugin 'plug' which is then registered, and subsequently used by \pkg{inline}.
 
+
+\subsection{How can I pass one additional flag to the compiler?}
+
+\begin{quote}
+  \emph{How can I pass \verb{-std=c++0x} to the \verb{g++} compiler without
+    writing a new plugin?}
+\end{quote}
+
+The quickest way is to modify the return value from an existing plugin. Here
+we use the default one from \pkg{Rcpp} itself. As it does not set the
+\code{PKG_CXXFLAGS} variable, we simply assign this. For other plugins, one
+may need to append to the existing values instead.
+
+<<eval=FALSE>>=
+myplugin <- getPlugin("Rcpp")
+myplugin$env$PKG_CXXFLAGS <- "-std=c++0x"
+f <- cxxfunction(signature(), settings=myplugin, body='
++    std::vector<double> x = { 1.0, 2.0, 3.0 };  // fails without -std=c++0x
++    return Rcpp::wrap(x);
++ ')
+f()
+@
+
 \subsection{How can I set matrix row and column names ?}
 
 \begin{quote}

Modified: pkg/Rcpp/inst/doc/Rcpp.bib
===================================================================
--- pkg/Rcpp/inst/doc/Rcpp.bib	2012-01-22 00:21:50 UTC (rev 3444)
+++ pkg/Rcpp/inst/doc/Rcpp.bib	2012-01-24 20:43:06 UTC (rev 3445)
@@ -108,7 +108,7 @@
   title =	 {{Rcpp}: Seamless {R} and {C++} Integration},
   author =	 {Dirk Eddelbuettel and Romain Fran\c{c}ois},
   year =	 2011,
-  note =	 {R package version 0.9.7},
+  note =	 {R package version 0.9.9},
   url =		 CRAN # "package=Rcpp"
 }
 



More information about the Rcpp-commits mailing list