You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
We have some differences in how each demo is being build. This creates few problems mentioned below. I want to make a pass on all of them and make all compilation flags consistent. Here are the changes that I'm considering:
Ensure that debug symbols are enabled with -g. This will allow for better debugging without affecting compilation times as much. (I'm still not entirely sure, if it's worth it, but I think it is, GCC enables this by default anyway)
Ensure the same C standard with -std=c99 (?) I think some people may disagree so I will quickly explain: Nuklear itself is C89 but the demos are not. Most of the demos already need C99 in some form or another, and even if you aren't getting any pedantic warnings with your setup, you will get them after using #define INCLUDE_ALL. We can keep the backend headers C89 compliant, but we should compile the demos with C99. This was allowed many years ago with 177f391 and if someone disagree, then we should consider rewriting the demos with C89 in mind and reverting said rule, instead of lying about the support with -std=c89. Right now, people are wasting their time for submitting "warning fixes" that someone is about to reintroduce anyway. (EDIT: after grepping the demos, it seems like most are using -std=c89 so maybe my take wasn't so accurate after all, I still think we should talk about it though)
Ensure we have the same warnings enabled with -Wall -Wextra -pedantic. Any ideas for other flags? We haven't tested with anything else, but maybe we should...
Add missing CIs as few demos do not have them (and this is must have when changing so much stuff)
We have some differences in how each demo is being build. This creates few problems mentioned below. I want to make a pass on all of them and make all compilation flags consistent. Here are the changes that I'm considering:
-O0. Currently, few demos use-O2and waste our CI time. (reference: demo/sdl3_renderer: rewrite Makefile in order to support Emscripten #894 (comment) )-g. This will allow for better debugging without affecting compilation times as much. (I'm still not entirely sure, if it's worth it, but I think it is, GCC enables this by default anyway)-std=c99(?) I think some people may disagree so I will quickly explain: Nuklear itself is C89 but the demos are not. Most of the demos already need C99 in some form or another, and even if you aren't getting any pedantic warnings with your setup, you will get them after using#define INCLUDE_ALL. We can keep the backend headers C89 compliant, but we should compile the demos with C99. This was allowed many years ago with 177f391 and if someone disagree, then we should consider rewriting the demos with C89 in mind and reverting said rule, instead of lying about the support with-std=c89. Right now, people are wasting their time for submitting "warning fixes" that someone is about to reintroduce anyway. (EDIT: after grepping the demos, it seems like most are using-std=c89so maybe my take wasn't so accurate after all, I still think we should talk about it though)-Wall -Wextra -pedantic. Any ideas for other flags? We haven't tested with anything else, but maybe we should...Any thoughts?
cc @RobLoach @rswinkle