c++ - Set CXXFLAGS in Rcpp Makevars -
i set c++ compiler flag -o0 in makevars of rcpp project.
if take @ /etc/r/makeconf, see compilation command seems be
$(cxx) $(all_cppflags) $(all_cxxflags) -c $< -o $@   since
all_cxxflags = $(r_xtra_cxxflags) $(pkg_cxxflags) $(cxxpicflags) $(shlib_cxxflags) $(cxxflags)   i can edit in makevars variable $(pkg_cxxflags) add headers specific libraries, not satisfied cxxflags = -o3 -pipe  -g $(lto). able directly in makevars, tune each project according needs.
when edit cxxflags in makevar, nothing happens. is possible adjust variable ? approach possible ? know can edit ~/.r/makevars, , switch requested. wondered if there more robust approach.
you want pkg_* variants in local file, e.g. ~/.r/makevars.
here (shortened, edited) portion of mine:
## c code cflags=               -o3 -g0 -wall -pipe -pedantic -std=gnu99   ## c++ code #cxxflags=             -g -o3 -wall -pipe -wno-unused -pedantic -std=c++11 cxxflags=             -g -o3 -wall -pipe -wno-unused -pedantic   ## fortran code #fflags=-g -o3 -wall -pipe fflags=-o3 -g0 -wall -pipe ## fortran 95 code #fcflags=-g -o3 -wall -pipe fcflags=-o3 -g0 -wall -pipe  ver=-4.8 cc=ccache gcc$(ver) cxx=ccache g++$(ver) shlib_cxxld=g++$(ver) fc=ccache gfortran f77=ccache gfortran make=make -j8   the other (system-global) approach create , edit /etc/r/makeconf.site (or, when /etc/r/ not exist, $rhome/etc/r/makeconf.site.   
Comments
Post a Comment