-
Notifications
You must be signed in to change notification settings - Fork 1
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
Amalgamation script, single-header cmake target & release script #42
Merged
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
…d and CLArgs, the last of which is an alias for one of the other two, based on user-provided option
…directories to CLArgs target
…nks with source or amalgamated conditionally
…bled with option --no-generated-file-warning
…amples and tests are renaming in previous commit
clang-tidy review says "All clean, LGTM! 👍" |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Description
The biggest feature of this development branch is the file amalgamate.py. It is responsible for analyzing the source headers of the project, resolving the correct topological ordering of them, and generating an amalgamated single-header version of the entire library. It accepts several command-line argument options for customizing the output.
I have also expanded the root CMakeLists.txt configuration. Previously there was a simple CLArgs interface target which made available all the headers of the library. Now, there are three targets; CLArgs_internal_source, CLArgs_internal_amalgamated and CLArgs. CLArgs_internal_source is the same as the previous CLArgs target. CLArgs_internal_amalgamated makes available the generated amalgamated header file containing the entirely library in one. To accomplish this I utilize CMake's
execute_process()
,add_custom_command()
andadd_custom_target()
functions to make the header generation part of the build system.Finally, I also implemented a release script. This script uses amalgamate.py as a python module to generate the amalgamated header file. It also generated a much simpler CMakeLists.txt, omitting any references to tests or examples and which only provides one target, CLArgs, which is the single-header version of the library. Additionally it includes a copy of the license, and the README file. This release script lives pretty isolated at the moment, but in the future I plan on creating a CI workflow that will use the script whenever a version tag is committed and release a new Github release for that version.
How Has This Been Tested?