I need to detect the OS name, compiler name, and version of the compiler with C++, as I need to change the setup for each case.
How can I do that?
For most compilers you can find a list of predefined macros.
I recommend define platform in build scripts by providing -D_i386 -DENDIAN=1234 -D_linux. But if you still think another predef project is your friend:
http://sourceforge.net/apps/mediawiki/predef/index.php?title=Main_Page
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With