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

chore: Makevars cleanup #671

Merged
merged 5 commits into from
Feb 13, 2023
Merged

chore: Makevars cleanup #671

merged 5 commits into from
Feb 13, 2023

Conversation

krlmlr
Copy link
Contributor

@krlmlr krlmlr commented Feb 13, 2023

This adds a dummy C++ file to ensure that a C++ linker is always selected. Also, we don't need to ship src/Makevars .

Rationale, from r-exts, https://cran.r-project.org/doc/manuals/r-release/R-exts.html#External-C_002b_002b-code:

Even fewer external libraries use C++ internally but present a C interface, such as rgeos. These require the C++ runtime library to be linked into the package’s shared object/DLL, and this is best done by including a dummy C++ file in the package sources.

This is essentially what we sent to CRAN, plus the dummy C++ file.

@krlmlr krlmlr changed the title Makevars cleanup chore: Makevars cleanup Feb 13, 2023
@codecov
Copy link

codecov bot commented Feb 13, 2023

Codecov Report

Merging #671 (51d7ef0) into main (438c21d) will not change coverage.
The diff coverage is n/a.

@@           Coverage Diff           @@
##             main     #671   +/-   ##
=======================================
  Coverage   60.48%   60.48%           
=======================================
  Files          73       73           
  Lines       21608    21608           
=======================================
  Hits        13070    13070           
  Misses       8538     8538           

📣 We’re building smart automated test selection to slash your CI/CD build times. Learn more

@@ -0,0 +1 @@
// This file is required so that package installation uses a C++ linker.
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@szhorvat
Copy link
Member

szhorvat commented Feb 13, 2023

Since this is following advice directly from the R manual, I guess it's fine. Please just keep that link to the manual in a comment in the sources.

This file is not going to be compiled, so there won't be issues with empty compilation units (which CRAN would complain about). No need for hacks like this.

@ntamas ntamas merged commit 4cac7c4 into main Feb 13, 2023
@ntamas ntamas deleted the f-cxx branch February 13, 2023 09:14
@github-actions github-actions bot locked as resolved and limited conversation to collaborators Mar 13, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants