[Cmake] Determining host compiler/OS from CMake
Sebastien BARRE
sebastien.barre at kitware.com
Thu Feb 28 14:30:09 EST 2002
At 2/28/2002 02:20 PM, Parag Chandra wrote:
>Ok, well I searched in my CmakeCache file and I see that there is a
>CMAKE_CXX_COMPILER variable;
as well as CMAKE_GENERATOR
> that might be good enough for my purposes.
Definitely.
>Now, how can I perform a test on that to see if it matches another
>string, i.e. something like:
>
>IF (CMAKE_CXX_COMPILER MATCHES "VC++60")
> Do one command here
>ELSE (CMAKE_CXX_COMPILER MATCHES "VC++60")
> Do another command otherwise
>ENDIF
>
>I tried both {$CMAKE_CXX_COMPILER} and the way listed above, and both of
>them cause Cmake to complain with parse errors.
Unless you messed up with a copy/paste, the ENDIF should be:
ENDIF (CMAKE_CXX_COMPILER MATCHES "VC++60")
--
Sebastien Barre
More information about the CMake
mailing list