[Openmp-commits] [PATCH] D40386: [OpenMP] Add entry for Intel Compiler 18
Joachim Protze via Phabricator via Openmp-commits
openmp-commits at lists.llvm.org
Tue Dec 5 05:33:43 PST 2017
protze.joachim added a comment.
In https://reviews.llvm.org/D40386#940428, @Hahnfeld wrote:
> 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...
The preprocessor cannot do arithmetic replacements. So stringer will not work.
One way would be to calculate the value on execution.
Since CMake has the information, we could configure the source and let CMake provide the compiler version.
More information about the Openmp-commits