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

Update Boost example #531

Merged

Conversation

ScottBailey
Copy link
Contributor

@ScottBailey ScottBailey commented Jan 11, 2024

Boost is a great library and it's important to many projects. This PR is written to show an example of escaping input in the OPTIONS argument of CPMAddPackage() and converts from git clone to acquiring the source release archive and testing against a hash.

While a git clone of a github repo often makes sense, even a shallow copy of Boost is time consuming due to the many submodules involved. For my 50mbit connection, it takes almost 3 minutes to clone the repo. Using the github releasse cuts the time to 33 seconds.

This is also the only example of getting the tar of a release from github which, I think, should be the most common approach as it requires the least bandwidth.

I believe this may close #501

Tested in Debian GNU/Linux and Windows 11.

Added information on locating GitHub repository's source archives and determining SHA256 hash values.

TheLartians
TheLartians previously approved these changes Jan 12, 2024
Copy link
Member

@TheLartians TheLartians left a comment

Choose a reason for hiding this comment

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

This is great, thanks for updating the example to show how to use releases!

Would it make sense to also update the boost example in the readme and explaining the advantage of using a release directly for large projects there?

@ScottBailey
Copy link
Contributor Author

Would it make sense to also update the boost example in the readme and explaining the advantage of using a release directly for large projects there?

It would make a TON of sense to do that. I had forgotten the example was even in the readme. I'll update that in the next couple days and and ask for a rereview.

@TheLartians
Copy link
Member

I'll update that in the next couple days and and ask for a rereview.

@ScottBailey any ETA on this? Otherwise we can also go ahead with merging the examples now and update the Readme in a future PR.

@ScottBailey
Copy link
Contributor Author

I'll update that in the next couple days and and ask for a rereview.

@ScottBailey any ETA on this? Otherwise we can also go ahead with merging the examples now and update the Readme in a future PR.

Let's hold off until Friday COB. I am hoping to have some "free" time then. I made a number of edits but then got pulled away for my paying gig.

Copy link
Member

@TheLartians TheLartians left a comment

Choose a reason for hiding this comment

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

Thanks for the elaborate readme additions! I wasn't aware GitHub as archive support for any commits. Perhaps this should be the default way for CPM to download repositories using the shorthand syntax - but that can be discussed in the future.

README.md Outdated Show resolved Hide resolved
@TheLartians TheLartians enabled auto-merge (squash) February 2, 2024 18:20
@TheLartians TheLartians merged commit a8144f5 into cpm-cmake:master Feb 2, 2024
8 checks passed
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

Successfully merging this pull request may close these issues.

right now it's not possible to add boost properly using CPM
2 participants