-
Notifications
You must be signed in to change notification settings - Fork 165
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
Replace custom platform detection logic with Boost.Predef #13
Comments
First off, there may be a license conflict: Boost.Predef is licensed under the Boost license, whereas this project is BSD 2-clause. Maybe that's not a problem if we ship an unmodified version of the original, but I'd like to be sure. My opinion is that the Base64 library should in principle be self-contained, without any third party code. Rationale: I don't want to maintain third party code if I don't have to, and I'd prefer to keep the scope of this library small. (Including lots of extra code automatically pulls in... lots of extra code.) |
OK, so let's get the licensing issue settled first:
The boost license basically says that we have the permission to
Well, actually it is both 😄. Many Boost libraries build upon those preprocessor checks and it is included in the main Boost package. Therefore I would call it an integral part. On the other hand it doesn't depend on anything but the C Preprocessor and has its own github repository, i.e. it is well suited for use outside of the Boost context without pulling in any other library or source file.
I suggest that we include the Boost.Predef library through the means of a git submodule hook targetting their official github repository. That way you can maintain a clear seperation between Boost.Predef and your project plus getting all the benefits of using the Boost.Predef library. Boost.Predef issues would be reported to their repository and addressed over there which may even reduce the amount of code you have to maintain.
While one cannot use Boost.Predef stuff directly from CMake, it is indeed possible to build a very clean and lean platform detection module on top of Boost.Predef. HTH |
Hi,
Proposal: Replace all the custom preprocessor checks for architecture, platform, compiler, SIMD, etc. with the Boost.Predef library which is independent and header only, so that one can simply import the necessary header files into the repository and be done with it (please note that this is an internal change and doesn't affect library users in any way). I think that this will improve code readability, because the Boost.Predef macros are far more descriptive and might prevent fallacies like the one in #12, e.g. compare
with
If you think that this is a good idea, but don't have the time to make the change I'll happily submit a pull request.
Cheers,
Henrik
The text was updated successfully, but these errors were encountered: