[cmake-developers] Retrieving OS Version in CMake

Harry Mallon Harry.Mallon at codex.online
Mon Jun 4 13:41:52 EDT 2018


Hello all,

We have some CMake code that sanity checks the build and checks for our supported operating systems.

Would there be a use case for a Module that could retrieve OS name and version (e.g. on macOS parse “sw_vers” to get “Mac OS X” and “10.13.4”, on Linux parse /etc/os-release to get “Fedora” and “28”)? Is there already a way to get these in CMake?

Best,
Harry

Harry Mallon

Senior Software Engineer

[http://codex.online/?action=asset&id=E3D62C3D-A12C-447D-87A5-F36E7C2AA9A4]<https://codex.online/>

T +44 203 7000 989<callto:+44%20203%207000%20989>

60 Poland Street | London | England | W1F 7NT

[http://codex.online/?action=asset&id=6F42BDF2-3C6D-4054-A5D2-277E0E535942]
Three Billboards        Blade Runner 2049        I, Tonya


-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://cmake.org/pipermail/cmake-developers/attachments/20180604/9a519d0c/attachment.html>


More information about the cmake-developers mailing list