OPM/opm-core — pull request #232 by rolk (2013-04-16 10:12:20+00:00)
Title: cmake fails on RH 6.4

I have tried to build on a RH 6.4 workstation with cmake 2.8.9. The following error message is given:

```
CMake Error at cmake/Modules/UseSystemInfo.cmake:45 (string):
string sub-command REGEX, mode REPLACE needs at least 6 arguments total to
command.
Call Stack (most recent call first):
cmake/Modules/UseSystemInfo.cmake:27 (read_release)
cmake/Modules/UseSystemInfo.cmake:6 (distro_name)
CMakeLists.txt:76 (system_info)
```

I have done some debugging. Line 45-47 of UseSystemInfo.cmake says:

```
string (REGEX REPLACE
"^${valuename}=\"?\(.*\)" "\\1" ${varname} ${_distrib}
)
```

I tested to see what these variables contained and found out that `_distrib` is empty. My quick fix was to quote the variable, i.e.

```
string (REGEX REPLACE
"^${valuename}=\"?\(.*\)" "\\1" ${varname} "${_distrib}"
)
```

This solved my problem. I am not sure if this is a good fix, or if one should check whether `_distrib` is empty before `string (REGEX REPLACE ...)` is called?