I have a simple cmake project (on linux) that loads some libraries from user places. Now I would like to use the Intel compiler instead of the gnu compiler and add some if statement to my CMakeLists.txt, which loads different libraries depending on the type of compiler used.
So, I would like to indicate the use of the Intel compiler through the CXX environment variable (is that right?) At the time of cmake configuration. Then I need an if-statement in the line
IF ( INTEL_IS_USED )
BLA BLA
ELSE
BLA BLA
What would be the easiest way to do this? In particular, is there some kind of variable that I can query for the compiler type and what is its value for the Intel compiler?
Cheers, Oliver
source
share