[CMake] Differentiate between Linux and FreeBSD
Josef Karthauser
joe.karthauser at geomerics.com
Tue Apr 22 07:34:57 EDT 2008
> -----Original Message-----
> From: cmake-bounces at cmake.org [mailto:cmake-bounces at cmake.org] On
> Behalf Of dizzy
> Sent: 22 April 2008 12:31
> To: cmake at cmake.org
> Subject: Re: [CMake] Differentiate between Linux and FreeBSD
>
> On Monday 21 April 2008 12:51:46 Horacio Sanson wrote:
> > 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??
>
> Why do you need to know if it is a Linux or a FreeBSD?
>
The generic way to tell is to call the 'uname' command, which
generically tells you what operating system you are running on. You can
contrive to call this from within CMake if you care to.
Joe
More information about the CMake
mailing list