Intel® C++ Compiler
Community support and assistance for creating C++ code that runs on platforms based on Intel® processors.
7956 Discussions

Getting Linux release on compilation stage

alexvi
Beginner
246 Views
Hi,

Linux 2.6.18-92.el5

icpc -v
Version 11.0

Is there any predefined macros that defines Linux release (on compilation stage), like macros __INTEL_COMPILER that defines compiler version?

Thanks

Alex Vinokur


0 Kudos
1 Reply
TimP
Honored Contributor III
246 Views


Linux 2.6.18-92.el5

icpc -v
Version 11.0

Is there any predefined macros that defines Linux release (on compilation stage), like macros __INTEL_COMPILER that defines compiler version?


There are several macros associated with gcc/g++ versions documented in the .pdf under Additional Predefined Macros. If that's not what you want, you may have to put something in your Makefile which sets up a macro, for example a macro which captures text from uname. More often, glibc or binutils version may be of interest.
0 Kudos
Reply