Add a “version” module to remove git dependency #269
Merged
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.
Complete this sentence
THIS PULL REQUEST IS READY TO MERGE
Feature or improvement description
This pull request changes the versioning system as it was initially implemented in CMake. This does not affect the build for Windows with Visual Studio.
The existing implementation inserts the git hash (AKA the version) into the source code through a compiler flag and preprocessor directive in NWTC_IO. Therefore, anytime the git status changes the compile command also changes so everything has to be recompiled.
This pull request improves the build system
These changes mean that the compile command for the other modules does not change with the git commit and only the lightweight Version module needs to be recompiled. The driver programs which use this module are relinked during compile time.
Related issue, if one exists
#267
Impacted areas of the software
The build system through CMake
Additional supporting information
This is important when dealing with multiple branches as the git status changes frequently. Also, it will enable improved performance in the automated testing.
Test results, if applicable
Only the existing TravisCI tests are necessary.