Skip to content

Pass flags to R CMD check #4

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

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 commented Sep 8, 2016

e.g. --use-valgrind

@gaborcsardi gaborcsardi modified the milestone: CRAN submission Sep 13, 2016
@gaborcsardi
Copy link
Collaborator

gaborcsardi commented Sep 13, 2016

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

@gaborcsardi
Copy link
Collaborator

--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

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

Windows is still a TODO.

@gaborcsardi
Copy link
Collaborator

OK, implemented for windows as well.

@izmirlig
Copy link

izmirlig commented Dec 3, 2019

How about -fno-common

@ekalosak
Copy link

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

@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 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
Development

No branches or pull requests

4 participants