[Rcpp-commits] r3085 - pkg/RcppEigen/R

noreply at r-forge.r-project.org noreply at r-forge.r-project.org
Wed Jun 15 21:07:37 CEST 2011


Author: dmbates
Date: 2011-06-15 21:07:37 +0200 (Wed, 15 Jun 2011)
New Revision: 3085

Added:
   pkg/RcppEigen/R/SHLIB.R
   pkg/RcppEigen/R/inline.R
   pkg/RcppEigen/R/unit.test.R
Log:
Add support for inline package


Added: pkg/RcppEigen/R/SHLIB.R
===================================================================
--- pkg/RcppEigen/R/SHLIB.R	                        (rev 0)
+++ pkg/RcppEigen/R/SHLIB.R	2011-06-15 19:07:37 UTC (rev 3085)
@@ -0,0 +1,23 @@
+## Copyright (C)       2010 Dirk Eddelbuettel, Romain Francois and Douglas Bates
+##
+## This file is part of RcppArmadillo.
+##
+## RcppArmadillo is free software: you can redistribute it and/or modify it
+## under the terms of the GNU General Public License as published by
+## the Free Software Foundation, either version 2 of the License, or
+## (at your option) any later version.
+##
+## RcppArmadillo is distributed in the hope that it will be useful, but
+## WITHOUT ANY WARRANTY; without even the implied warranty of
+## MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+## GNU General Public License for more details.
+##
+## You should have received a copy of the GNU General Public License
+## along with RcppArmadillo.  If not, see <http://www.gnu.org/licenses/>.
+
+SHLIB <- Rcpp:::SHLIB.maker( 
+    env = list( 
+        PKG_LIBS = Rcpp:::RcppLdFlags(),
+        PKG_CPPFLAGS = Rcpp:::RcppCxxFlags()
+   )
+)

Added: pkg/RcppEigen/R/inline.R
===================================================================
--- pkg/RcppEigen/R/inline.R	                        (rev 0)
+++ pkg/RcppEigen/R/inline.R	2011-06-15 19:07:37 UTC (rev 3085)
@@ -0,0 +1,22 @@
+## Copyright (C)       2010 Dirk Eddelbuettel, Romain Francois and Douglas Bates
+##
+## This file is part of RcppEigen.
+##
+## RcppEigen is free software: you can redistribute it and/or modify it
+## under the terms of the GNU General Public License as published by
+## the Free Software Foundation, either version 2 of the License, or
+## (at your option) any later version.
+##
+## RcppEigen is distributed in the hope that it will be useful, but
+## WITHOUT ANY WARRANTY; without even the implied warranty of
+## MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+## GNU General Public License for more details.
+##
+## You should have received a copy of the GNU General Public License
+## along with RcppEigen.  If not, see <http://www.gnu.org/licenses/>.
+
+inlineCxxPlugin <- Rcpp:::Rcpp.plugin.maker(
+	include.before = "#include <RcppEigen.h>", 
+	package        = "RcppEigen"
+)
+

Added: pkg/RcppEigen/R/unit.test.R
===================================================================
--- pkg/RcppEigen/R/unit.test.R	                        (rev 0)
+++ pkg/RcppEigen/R/unit.test.R	2011-06-15 19:07:37 UTC (rev 3085)
@@ -0,0 +1,29 @@
+# Copyright (C)        2011 Dirk Eddelbuettel, Romain Francois and Douglas Bates
+#
+# This file is part of RcppEigen.
+#
+# RcppEigen is free software: you can redistribute it and/or modify it
+# under the terms of the GNU General Public License as published by
+# the Free Software Foundation, either version 2 of the License, or
+# (at your option) any later version.
+#
+# RcppEigen is distributed in the hope that it will be useful, but
+# WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with RcppEigen.  If not, see <http://www.gnu.org/licenses/>.
+
+test <- function( output = if( file.exists( "/tmp" ) ) "/tmp" else getwd() ){
+	if( !file.exists( output ) ){ stop( "output directory does not exist" ) }
+	
+	Rscript <- file.path( R.home( component = "bin" ), "Rscript" )
+	if( .Platform$OS.type == "windows" ){
+		Rscript <- sprintf( "%s.exe", Rscript )
+	}
+	test.script <- system.file( "unitTests", "runTests.R", package = "RcppEigen" )
+	cmd <- sprintf( '"%s" "%s" --output=%s', Rscript, test.script, output )
+	system( cmd )
+}
+



More information about the Rcpp-commits mailing list