Every preprocessor branch is possibly a new potential bug
And every line of code is a potential disaster. If well done, preprocessor can be really useful (and DEBUG or NDEBUG sometimes are really useful).
with GCC you just have to use 2/3 different compiler options when creating the target.
- Generate debug symbols : allow debugging with GNU tools
- Generate profile symbols : allow Gproof profiling
- Strip symbols : remove all non-externally visible symbols to reduce binary size (also override the options to generate debug and profile symbols)
- Optimizations : (- Os -O1 -O2 etc..) usually optimizations are not enable with debug symbols
That's roughly the same for visual c++. and also for clang. except options about floating-point model, architecture, vectorization and so on...
I think hendu was referring to that (stripping is about generating a new binary without something, not about removing something from a pre-made binary)
Maybe I misunderstood something then (english is not my mother language...). Still not sure.
Back to the point: I really think Irrlicht could use a CMake script, for those reasons:
- ability to put project files not in source tree
- ability to use the toolchain you want
- way easier to maintain (devs don't have to maintain a dozen different project files, just one script)
- more control (it would be possible to include a "build_all" option that would build Irrlicht + examples + documentation - in all possible configs, ie Release, Debug [_d], ReleaseWithDebugInfo [_rd] and MinSizeRelease [_rm])