-
-
Notifications
You must be signed in to change notification settings - Fork 1.3k
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
feat(build): include cpp guideline support library #4776
Conversation
# Cpp Core Guideline Support Library (GSL) | ||
include(FetchContent) | ||
|
||
FetchContent_Declare(GSL |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Will this work without internet access during the build? If yes then in which directory are those downloaded archives expected to reside in?
Please compare with how libkeyfinder is integrated. This allows to manually download the archives in advance and run the build without an internet connection.
Otherwise it would break at least the RPM Fusion builds.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Mhmmm yeah, this was the recommend integration by MS, I'll look into offline ways to build this.
Our traditional way of integration would be just to copy it to our lib folder. It is only a set of header files anyway. And has the advantage to be part of the tar ball. |
https://github.com/gsl-lite/gsl-lite maintains a single header version. Interesting in our case. |
Ah, there is already a Linux package: ms-gsl is also part of VCPKG So much guess we should use that. I can take care. |
Unfortunately I have zero idea how vcpkg works (or cmake for that matter) so I'd really appreciate if someone other than me could take over here. |
The package on Linux package on Ubuntu Focal seems rather old. I think it would make sense to use the same version on all platforms here. The single header gsl-lite sounds like the best fitting solution to me. |
Was there a change to gsl::not_null that we really need since 2.1.0? I guess it will work good enough anyway. But both solutions will work for me. |
I don't want to rely on the distribution for a header-only library. Also this only helps us on Linux. IMO using vcpkg or manually downloading it like with libkeyfinder makes more sense. |
VCPKG + relying on distros comes in a union. I would prefer either to literally copy the required files into our lib folder, or rely on the distros, because both produces the minimum hassles. The normal pattern we use until now is to rely on the.distros and overlay them only if required by our lib folder. Not sure if this also applies here, because it is "only" a header file. In addition I see on the horizon two patches, a specialisation for 'std::unique_ptr' and a replacement of "Expects" implemented by assert() by our own asserts, What do you think? |
The vcpkg install PR is here: mixxxdj/vcpkg#44 |
As discussed on Zulip https://mixxx.zulipchat.com/#narrow/stream/109171-development/topic/passing.20mutable.20references.20as.20pointers
I will edit the wiki accordingly.