4 ms·
I think the general idea is simply that you don't use #ifdef but instead move the conditional compilation logic to the build script / build system. Of course yo
by jstimpfle 6y ago
I think the general idea is simply that you don't use #ifdef but instead move the conditional compilation logic to the build script / build system. Of course you should group in files in a way that avoids redundancy.
This is the way I'm going about it at least, even though I assume there might be complex situations where the boilerplate isn't warranted and it's better to put all the variants in a single file and use the preprocessor to determine which alternative to compile.
Like you say in the end, test features (or maybe standards support), not too-specific things like OS or distribution.
- pjmlp 6y agoYep, this is something we can definitely agree on. :)
- knorker 6y ago> the general idea is simply that you don't use #ifdef but instead move the conditional compilation logic to the build script / build system. Yes, I entirely agree. But do NOT split it into what OS or architecture it is, like what I was replying to said.