[CMake] Detecting linux distro?

Kedzierski, Artur CIV NSWC Corona, PA53 artur.kedzierski at navy.mil
Mon Mar 3 16:32:20 EST 2008


 
	I had to do that too. I ended up going by distribution-specific
file in /etc. For example, 
Red Hat:   /etc/redhat-release
Slackware: /etc/slackware-version
Slamd64:   /etc/slamd64-version
	To determine whether it is 64-bit vs 32-bit Red Hat, I use 
'uname -m'.


--
Artur Kedzierski

-----Original Message-----
From: cmake-bounces+artur.kedzierski=navy.mil at cmake.org
[mailto:cmake-bounces+artur.kedzierski=navy.mil at cmake.org] On Behalf Of
Stephen Quinney
Sent: Monday, March 03, 2008 9:09
To: CMake
Subject: [CMake] Detecting linux distro?

I'm sure I'm not the first person to need to do this but I can't see
an obvious solution. I want to be able to detect which Linux system
the package is building on, i.e. is it Fedora, Debian, Gentoo, etc?
And also beyond that, what version of the distro is it? (e.g. FC6. F9,
Debian 4.0) Can someone point me in the right direction?

Thanks,

Stephen Quinney


_______________________________________________
CMake mailing list
CMake at cmake.org
http://www.cmake.org/mailman/listinfo/cmake


More information about the CMake mailing list