RcppCore / RcppArmadillo

Rcpp integration for the Armadillo templated linear algebra library
193 stars 56 forks source link

set includes in PKG_CPPFLAGS #407

Closed kevinushey closed 1 year ago

kevinushey commented 1 year ago

Fixes the underlying issue in https://github.com/RcppCore/RcppArmadillo/issues/406. With this, the compiler invocation when building on macOS is (for example):

clang++ -mmacosx-version-min=10.13 -std=gnu++14 -I"/Library/Frameworks/R.framework/Resources/include" -DNDEBUG -I../inst/include -I'/Users/kevin/Library/R/x86_64/4.2/library/Rcpp/include' -I/usr/local/include   -fPIC  -Wall -g -O2  -c RcppArmadillo.cpp -o RcppArmadillo.o
< ... >

And because -I../inst/include is now coming before -I/usr/local/include, we should now be able to avoid issues where a system installation of Armadillo in /usr/local/include takes precedence over the bundled version.