Quoting Horacio Sanson <[EMAIL PROTECTED]>:
On Mon, Apr 21, 2008 at 7:01 PM, Pau Garcia i Quiles
<[EMAIL PROTECTED]> wrote:
Quoting Horacio Sanson <[EMAIL PROTECTED]>:
> 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:
I tried using this variable but for some reason it seems to be empty
(i.e. calling MESSAGE with this var as parameter does not print
anything). This happens in both Linux (Kubuntu 7.10) and FreeBSD 7.1.
It works for me:
MESSAGE( STATUS "Platform: " ${CMAKE_SYSTEM_NAME} )
outputs
-- Platform: Linux
What version of CMake are you using?
--
Pau Garcia i Quiles
http://www.elpauer.org
(Due to my workload, I may need 10 days to answer)
_______________________________________________
CMake mailing list
CMake@cmake.org
http://www.cmake.org/mailman/listinfo/cmake