From d2921faec8c46f6acc7e2d36ec6c757d63733f98 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Lars=20Vingli=20Ods=C3=A6ter?= Date: Tue, 16 Apr 2013 09:19:00 +0200 Subject: [PATCH] Quote possibly empty variable to avoid error message On RedHat 6.4 workstation the module doesn't find the necessary system information, and gives an error message when the last parameter to the string function is not present. --- cmake/Modules/UseSystemInfo.cmake | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/cmake/Modules/UseSystemInfo.cmake b/cmake/Modules/UseSystemInfo.cmake index 2a3a3dca..0fe61e9b 100644 --- a/cmake/Modules/UseSystemInfo.cmake +++ b/cmake/Modules/UseSystemInfo.cmake @@ -43,7 +43,7 @@ function (read_release valuename FROM filename INTO varname) REGEX "^${valuename}=" ) string (REGEX REPLACE - "^${valuename}=\"?\(.*\)" "\\1" ${varname} ${_distrib} + "^${valuename}=\"?\(.*\)" "\\1" ${varname} "${_distrib}" ) # remove trailing quote that got globbed by the wildcard (greedy match) string (REGEX REPLACE