Improve flags to allow subproject specific debug configuration #10
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.
Hello there,
we have been using this library for a while now as a submodule in a student project of ours and it works like a charm. However our project has become enormous in size and relies on multiple submodules.
New Features
This pull request introduces two small changes to preprocessor directives:
RS_
prefix to the debug macro. This allows specifying that only the debug flag in the Reed-Solomon submodule is set and not for the whole project.RS_NO_ASSERT
macro. Our project will later run on an STM32L4 Microcontroller and therefore can only use freestanding libraries. With this flag we could disable including<assert.h>
without having to set the debug flag.Breaking changes
The first change might break some interfaces, that rely on the
DEBUG
macro. If this is not manageable i could also remove this renaming.Also we think with the
__CC_ARM
you wanted to remove non-freestanding libraries when cross-compiling for an arm-microcontroller. In case this is true, let me suggest using the__STDC_HOSTED__
directive instead (see cppreference). This is set to 0 by the compiler when using a freestanding implementation and can be used to determine whether to include<assert.h>
for a broader target than just cc_arm.