3 execute_process(COMMAND lsb_release -a OUTPUT_VARIABLE _out ERROR_VARIABLE _err RESULT_VARIABLE _result)
5 string(COMPARE EQUAL "${_out}
" "" _ok)
8 string(REGEX REPLACE "\n
" ";
" _out ${_err})
10 string(REGEX REPLACE "\n
" ";
" _out ${_out})
15 if("${_i}
" MATCHES "^[Rr][Ee][Ll][Ee][Aa][Ss][Ee].*
")
16 string(REGEX REPLACE ":
" ";
" _i ${_i})
18 string(STRIP ${_i} _release)
21 if("${_i}
" MATCHES "^[Dd][Ii][Ss][Tt][Rr][Ii][Bb][Uu][Tt][Oo][Rr].*
")
22 string(REGEX REPLACE ":
" ";
" _i ${_i})
24 string(STRIP ${_i} _distrib)
29 string(COMPARE EQUAL "${_distrib}
" "" _ok1)
30 string(COMPARE EQUAL "${_release}
" "" _ok2)
32 if(${_ok1} OR ${_ok2})
33 message(SEND_ERROR "could not determine linux release!
")
36 set(LINUX_DISTRIBUTION ${_distrib})
37 set(LINUX_RELEASE ${_release})