[CMake] Differentiate between Linux and FreeBSD
Pau Garcia i Quiles
pgquiles at elpauer.org
Mon Apr 21 06:01:29 EDT 2008
Quoting Horacio Sanson <hsanson at gmail.com>:
> I can use IF(WIN32) and IF(UNIX) to set some variables depending if
> cmake is executed in Windows or UNIX systems. The problem is that UNIX
> in this context includes both Linux and FreeBSD.
>
> Has CMake a way to know if it is running in a Linux box or a FreeBSD box??
Use the CMAKE_SYSTEM_NAME variable:
http://www.cmake.org/Wiki/CMake_Useful_Variables#System_.26_Compiler_Information
--
Pau Garcia i Quiles
http://www.elpauer.org
(Due to my workload, I may need 10 days to answer)
More information about the CMake
mailing list