build.sh: Don't use -Werror as default. #9420
Open
+6
−6
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.
While being a good practice to use during development, enabling
-Werrorby default for deployment and user builds is a guarantee for failed builds.It is not feasible for development to keep up with all warnings in all compiler versions, especially ones from the future.
To avoid the build being broken, this patch sets
-Werrorbeing disabled as default behavior. This mimics the behavior of CMake being invoked directly without the build.sh script.While a zero warning policy is good, and
-Werrorshould also be enabled by default on the CI, it is a bad practice for deployment.https://embeddedartistry.com/blog/2017/05/22/werror-is-not-your-friend/
Problem solved by the commit
Project fails building on newer compiler versions.
Bug / issue (if any) fixed, which PR introduced the bug, how it was discovered
How problem was solved, alternative solutions (if any) and why they were rejected
Providing a saner default.
Risks (if any) associated the changes in the commit
The project will more likely build on newer compiler versions.
What has been tested and how, request additional testing if necessary
Documentation impact (if any)