-
Notifications
You must be signed in to change notification settings - Fork 3.5k
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
Add version macros for RapidJSON #311
Conversation
This may be the final commit for v1.0.0. |
1 similar comment
It is possible to generate version header automatically using CMake.
This approach has some cons though: there's no |
Yes. I have thought of this solution but I don't want cmake compulsory for using the library. Can it do another way round? Parse/match the header to cmake? Besides I do not know how those variables in cmake are used in the build process. |
Just wanted to add that it is a very useful feature to be able to use RapidJSON as a header-only library, without needing to compile anything. So, I agree with @miloyip that a build tool should not be required. |
Those variables were just a stub for you to use. Although I tend to have version defined in the build tool, there are possibilities to get version from other sources. One useful option is to use
I thought about parsing header files directly and it seems it is doable with some more additional effort. |
@jollyroger @pah Thanks for macro simplification advice. However I try to use the same variable names as those in CMAKE for consistency. |
Since RapidJSON is header-only library, I think that macros should be sufficient.
RapidJSON shall become v1.0.0 release after merge.
Fixes #310