Reputation: 69
On compilation I am getting lots of warnings that I would love to resolve. There are 30 or so but they all more or less look like these first three:
==> Rcpp::compileAttributes()
* Updated src/RcppExports.cpp
==> roxygen2::roxygenize('.', roclets=c('rd', 'collate', 'namespace'))
Creating a generic function for ‘as.list’ from package ‘base’ in package ‘roxygen_devtest’
Documentation completed
==> R CMD INSTALL --no-multiarch --with-keep.source myPackage
* installing to library ‘/Library/Frameworks/R.framework/Versions/3.3/Resources/library’
* installing *source* package ‘myPackage’ ...
clang++ -std=c++11 -I/Library/Frameworks/R.framework/Resources/include -DNDEBUG -I../inst/include -I/usr/local/include -I/usr/local/include/freetype2 -I/opt/X11/include -I"/Library/Frameworks/R.framework/Versions/3.3/Resources/library/Rcpp/include" -I"/Library/Frameworks/R.framework/Versions/3.3/Resources/library/BH/include" -fPIC -Wall -mtune=core2 -g -O2 -c RcppExports.cpp -o RcppExports.o
** libs
RcppExports.cpp:14:1: warning: unused variable 'rcpp_output_type' [-Wunused-variable]
BEGIN_RCPP
^
/Library/Frameworks/R.framework/Versions/3.3/Resources/library/Rcpp/include/Rcpp/macros/macros.h:31:9: note: expanded from macro 'BEGIN_RCPP'
int rcpp_output_type = 0 ; \
^
RcppExports.cpp:14:1: warning: unused variable 'rcpp_output_condition' [-Wunused-variable]
/Library/Frameworks/R.framework/Versions/3.3/Resources/library/Rcpp/include/Rcpp/macros/macros.h:32:10: note: expanded from macro 'BEGIN_RCPP'
SEXP rcpp_output_condition = R_NilValue ; \
^
RcppExports.cpp:49:1: warning: unused variable 'rcpp_output_type' [-Wunused-variable]
BEGIN_RCPP
^
/Library/Frameworks/R.framework/Versions/3.3/Resources/library/Rcpp/include/Rcpp/macros/macros.h:31:9: note: expanded from macro 'BEGIN_RCPP'
int rcpp_output_type = 0 ; \
^
RcppExports.cpp:49:1: warning: unused variable 'rcpp_output_condition' [-Wunused-variable]
/Library/Frameworks/R.framework/Versions/3.3/Resources/library/Rcpp/include/Rcpp/macros/macros.h:32:10: note: expanded from macro 'BEGIN_RCPP'
SEXP rcpp_output_condition = R_NilValue ; \
^
If anyone can point me in the right direction I would appreciate it. If more of the output is needed I can provide it, I just wanted to keep the message as short as possible.
Upvotes: 2
Views: 1075
Reputation: 368409
I just add this to CXXFLAGS
in the file ~/.R/Makevars
:
CXXFLAGS += -O3 -Wall -pipe -Wno-unused
Upvotes: 4