Kommon: Bake KConst epoch into header file #75
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.
When using Kassiopeia as an external library, as described in #72 there were compilation issues observed, likely because of missing definition of the rerefence epoch. This commit fixes that by ensuring the corresponding compile-time constant to be baked into the corresponding header file.
Btw. an alternative approach would maybe include adding this variable to the
KommonConfig.cmake
file viaadd_compile_definitions
(ortarget_compile_definitions
), which however is less portable since that requires others to use the CMake build system to get the correct variables. The downside of this solution is that it only fixes the issue for KConst, the same type of issues may also appear for other flags that are added viatarget_compile_definitions
. Since we didn't have any issues with that so far, I think we can assume that it is fine for now.Closes #72.
This was tested by @pslocum in #74.