-
Notifications
You must be signed in to change notification settings - Fork 5
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
CPPFLAGS vs CXXFLAGS #1
Comments
Thanks for pointing this out. I will try to clean up |
I have looked a bit more into this and I think I can clean things a bit. However, the pthreads section of Writing R Extensions states that one should use
Reading on the web it seems your comment about this belonging to |
Hmm if it written in WRE than I stand corrected. But the other flags |
OK. You are definitely right about the In the gcc man page it sounds like
And according to this SO answer clang will only accept the flag when compiling and not when linking. |
From your Makevars files it seems you are confusing
CPPFLAGS
withCXXFLAGS
/CXX1XFLAGS
.CPPFLAGS
: C/C++ preprocessor flags. These are applied both to c and c++ preprocessor. Usually this only includes flags that start with-D
and-I
.CFLAGS
/CXXFLAGS
/CXX1XFLAGS
: Compiler flags for the c/c++/c++11 compiler that are not in the preprocessor. Things like-g -o -pthread
. You should rarely set these as R automatically uses the appropriate defaults.As a package author you do not have to manually pass any
CXXFLAGS
orCXX1X
flags in your Makevars. R does that automatically: c++ code is always compiled withCXXFLAGS
(orCXX1XFLAGS
whenCXX_STD = CXX11
)Hence the configure script should only set the
CPPFLAGS
which are system dependent based on how libssl was compiled and where it resides on the user system.The text was updated successfully, but these errors were encountered: