Skip to content
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

Pass flags to R CMD check #4

Closed
hadley opened this issue Sep 8, 2016 · 8 comments
Closed

Pass flags to R CMD check #4

hadley opened this issue Sep 8, 2016 · 8 comments

Comments

@hadley
Copy link
Collaborator

@hadley hadley commented Sep 8, 2016

e.g. --use-valgrind

@gaborcsardi gaborcsardi added this to the CRAN submission milestone Sep 13, 2016
@gaborcsardi gaborcsardi added this to the CRAN submission milestone Sep 13, 2016
@gaborcsardi
Copy link
Collaborator

@gaborcsardi gaborcsardi commented Sep 13, 2016

  • Command line arguments, like --use-valgrind
  • environment variables to set for the build.

@gaborcsardi
Copy link
Collaborator

@gaborcsardi gaborcsardi commented Sep 26, 2016

--use-valgrind is supported in e34f873. Maybe it would be simpler just to allow arbitrary arguments. The HTTP API itself works with arguments.

@gaborcsardi
Copy link
Collaborator

@gaborcsardi gaborcsardi commented Sep 27, 2016

Environment variables work as well. I just added arbitrary arguments as well, for Linux.

Windows is still a TODO.

@gaborcsardi
Copy link
Collaborator

@gaborcsardi gaborcsardi commented Oct 3, 2016

OK, implemented for windows as well.

@gaborcsardi gaborcsardi closed this Oct 3, 2016
@izmirlig
Copy link

@izmirlig izmirlig commented Dec 3, 2019

How about -fno-common

@ekalosak
Copy link

@ekalosak ekalosak commented Feb 7, 2020

I'm also curious about how to pass e.g. -fno-common to R CMD check, as it's a required flag for gcc10 compliance.

@gaborcsardi
Copy link
Collaborator

@gaborcsardi gaborcsardi commented Feb 7, 2020

@ekalosak That's not a flag for R CMD check. If is a compiler flag, so you can (temporarily) put it in your package's Makevars file.

@ekalosak
Copy link

@ekalosak ekalosak commented Feb 8, 2020

@gaborcsardi thank you for your quick response.
For others who are interested, the following adds -fno-common to the CFLAGS in a temporary Makevars - useful for running checks on code with native routine bindings.

withr::with_makevars(
  c(
    "CFLAGS"="-Wall -pedantic -fdiagnostics-color=always -fno-common"
  ),
  devtools::check()
)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Linked pull requests

Successfully merging a pull request may close this issue.

None yet
4 participants