[CMake] Determining ICC

Filipe Sousa filipe at ipb.pt
Tue Feb 21 13:46:18 EST 2006


Amitha Perera wrote:
> Folks,
> 
> How can I determine at CMake time whether the compiler is icc? 
> (Intel's compiler.) I want to do this to forcibly add appropriate
> threading flags, if the flags are not already present.

I have this for linux

IF(UNIX)
   IF(CMAKE_C_COMPILER MATCHES "icc")
     SET(CMAKE_COMPILER_IS_INTELC 1)
   ENDIF(CMAKE_C_COMPILER MATCHES "icc")

   IF(CMAKE_CXX_COMPILER MATCHES "icpc")
     SET(CMAKE_COMPILER_IS_INTELCXX 1)
   ENDIF(CMAKE_CXX_COMPILER MATCHES "icpc")
ENDIF(UNIX)

> Or, is there a better way to ensure that the compiler has the correct
> flags for threading?
> 
> Thanks,
> Amitha.
> 
> _______________________________________________
> CMake mailing list
> CMake at cmake.org
> http://www.cmake.org/mailman/listinfo/cmake
> 
> 



More information about the CMake mailing list