[Rcpp-devel] How to retrieve a flag set in Makevars.in or set the flag as a global variable?
Akshit Achara
acharaakshit at gmail.com
Sat Aug 15 14:23:33 CEST 2020
I have created an R package(rminizinc
<https://github.com/acharaakshit/RMiniZinc>) which uses Rcpp. I have a
configure.ac file to set up the paths in my Makevars.in which looks like
this:
CXX_STD = CXX11
PKG_CPPFLAGS = -I. @MZN_INCLUDE@
PKG_LIBS = @MZN_LIBS@
OBJECTS.tests = cpp_tests/test-runner.o cpp_tests/test-mzn_parse.o
cpp_tests/test-
set_params.o cpp_tests/test-mzn_eval.o cpp_tests/test-sol_parse.o
cpp_tests/test-
getMissingPars.o
OBJECTS.sources = RcppExports.o set_params.o mzn_parse.o mzn_eval.o sol_parse.o
getMissingPars.o
OBJECTS.helpers = filetoString.o helper_parse.o expDetails.o pathStringcheck.o
OBJECTS = $(OBJECTS.sources) $(OBJECTS.tests) $(OBJECTS.helpers)
$(SOURCES:.cpp=.o)
strippedLib: $(SHLIB)
if test -e "/usr/bin/strip"; then /usr/bin/strip --strip-debug
$(SHLIB); fi.phony: strippedLib
all: clean
clean:
rm -f $(OBJECTS.sources) $(OBJECTS.tests) $(OBJECTS.helpers) *.so
I want to use the path provided to PKG_LIBS flag in one of my scripts.
Is there any way I could set this flag as a global variable so that I
can read it the script or if it's not possible, how can I extract this
flag from inside R? Sys.getenv() doesn't give the values for PKG_LIBS.
Thanks,
Akshit
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.r-forge.r-project.org/pipermail/rcpp-devel/attachments/20200815/a74e7d6f/attachment-0001.html>
More information about the Rcpp-devel
mailing list