linux - Detect underlying platform/flavour in Cmake -


does know cmake variable or hook or can give me underlying platform name/flavour name on getting executed ? e.g. linux-centos linux-ubuntu linux-sles

i know cmake has "cmake_system" variable doesn't differentiating flavours of linux e.g. appreciated.

edit : read can done using lsb_release command ?

the following snippet populates lsb_release_id_short cmake variable information underlying linux system:

find_program(lsb_release lsb_release) execute_process(command ${lsb_release} -is     output_variable lsb_release_id_short     output_strip_trailing_whitespace ) 

on ubuntu, example, yields ubuntu.


Comments

Popular posts from this blog

c++ - QTextObjectInterface with Qml TextEdit (QQuickTextEdit) -

javascript - angular ng-required radio button not toggling required off in firefox 33, OK in chrome -

xcode - Swift Playground - Files are not readable -