[R-package] remove unused variables in configure.ac #3509
Merged
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Short summary
This removes some unused variables in
R-package/configure.ac
.Longer Summary
The CRAN build of the R package contains a file
configure
, which is a shell script that run whenever the package is installed. It looks around on the system to figure out things like "is OpenMP installed", then fills out variables in a templated Makefile (R-package/src/Makevars.[w]in
), which is then used to compile the library.configure
is created from a fileR-package/configure.ac
usingautoconf
.When
configure.ac
was originally added, I copied and pasted some code from other examples and "Writing R Extensions". That included this snippet:Now that I understand this better, I can see that
CXX
,CFLAGS
, andCPPFLAGS
are unused...they're not referenced in theAC_SUBST()
calls used to replace template string insrc/Makevars.[w]in
.How I tested this
I ran the following to test the package, before and after this change:
sh build-cran-package.sh R CMD INSTALL lightgbm*.tar.gz
The compiler and linker flags used in both cases were identical, and the library installed successfully, so I'm confident that these variables can be removed.