Skip to content

Commit

Permalink
bugfix: handling empty _linux_flavour variable if lsb_release is not …
Browse files Browse the repository at this point in the history
…installed
  • Loading branch information
matthiasrichter committed Nov 18, 2014
1 parent 6dc30c1 commit 45dbfa1
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions cmake/modules/WriteConfigFile.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -53,9 +53,10 @@ MACRO (WRITE_CONFIG_FILE filename)
OUTPUT_STRIP_TRAILING_WHITESPACE
)

STRING(REGEX REPLACE "^\"" "" _linux_flavour ${_linux_flavour})
STRING(REGEX REPLACE "\"$" "" _linux_flavour ${_linux_flavour})

IF(_linux_flavour)
STRING(REGEX REPLACE "^\"" "" _linux_flavour ${_linux_flavour})
STRING(REGEX REPLACE "\"$" "" _linux_flavour ${_linux_flavour})
ENDIF(_linux_flavour)

EXECUTE_PROCESS(COMMAND uname -m
OUTPUT_VARIABLE _system
Expand Down

0 comments on commit 45dbfa1

Please sign in to comment.