CMakeLists: Fallback to RelWithDebInfo
Currently, if .git exists, we set CMAKE_BUILD_TYPE=Debug.
Otherwise, we leave it empty and no optimization flags will
be used.
With this change, the fallback CMAKE_BUILD_TYPE is set
to RelWithDebInfo instead.
From CMAKE_BUILD_TYPE manual:
The default value is often an empty string, but this is usually not
desirable and one of the other standard build types is usually more appropriate.
Note: One notable change is that -DNDEBUG will now be defined.
Signed-off-by: Matan Breizman <mbreizma@redhat.com>
(cherry picked from commit
c5766bb2c48634925c8685b779ec814edc43d17b)