[Openmp-commits] [PATCH] D40386: [OpenMP] Add entry for Intel Compiler 18
Jonas Hahnfeld via Phabricator via Openmp-commits
openmp-commits at lists.llvm.org
Thu Nov 30 06:12:31 PST 2017
Hahnfeld added a comment.
In https://reviews.llvm.org/D40386#940287, @omalyshe wrote:
> In https://reviews.llvm.org/D40386#939020, @Hahnfeld wrote:
>
> > Question to Intel: At the moment we have to add a new compiler version each year. Can we switch to the same process used for Clang and GCC, i.e. automatically getting the version and composing the string?
>
>
> Intel compiler provides just two version-related macros, e.g.
>
> #define __INTEL_COMPILER 1800
> #define __INTEL_COMPILER_UPDATE 1
>
>
> Is there a simple way to turn them into "18.0.1" (and also "9999" into "mainline")?
You probably need to special case `9998` and `9999` - which is fine because these values don't change. For released versions (at least for the current way of defining the macros) the following should be possible (not tested):
#define KMP_COMPILER "Intel C++ Compiler " stringer(__INTEL_COMPILER / 100) "." stringer(__INTEL_COMPILER % 100) "." stringer(__INTEL_COMPILER_UPDATE)
Maybe you need to assign the temporary values to other defines for the macro magic to work, I'm not too familiar with how it works...
https://reviews.llvm.org/D40386
More information about the Openmp-commits
mailing list