c++ - Increase Rcpp compile speed -


i using rcpp write r package, uses c++ code, each time r cmd build <package name>, needs long time compile whole packages, since there couple of cpp files. there way can compile changed files/new files, instead of recompiling everything? thank much!

i have makevars file this:

pkg_cxxflags=-std=gnu++11  pkg_libs=-l. -lall 

the best trick know deploy awesome frontend ccache linux distros have, , os x has (in brew iirc). can used both g++ , clang.

so in ~/.r/makevars have

ver= ccache=ccache cc=$(ccache) gcc$(ver) cxx=$(ccache) g++$(ver) shlib_cxxld=g++$(ver) fc=ccache gfortran$(ver) #fc=gfortran f77=$(ccache) gfortran$(ver) 

where ver empty 4.9 default. if re-build same package on , over, compile-time fast unchanged code leads object files being retrieved.


Comments

Popular posts from this blog

python - No exponential form of the z-axis in matplotlib-3D-plots -

php - Best Light server (Linux + Web server + Database) for Raspberry Pi -

c# - "Newtonsoft.Json.JsonSerializationException unable to find constructor to use for types" error when deserializing class -