libgit2/libgit2 — pull request #1027 by PaulThompson (2012-10-27 23:34:42+00:00)
Title: Cmake flags clean

4 commits on CMakeLists.txt
Aimed at improving maintainability and ability of compiling developer to control via cmake.
Clarifies but does not change present behaviour.

Remove duplicate CMAKE_C_FLAGS inside CMAKE_C_FLAGS_DEBUG.
- For Debug builds, CMake uses concatenated
CMAKE_C_FLAGS and CMAKE_C_FLAGS_DEBUG
- This reverts commit 291f7122927d2cc170dc63c378a08fa78515d987.
(CMAKE_C_FLAGS is still controllable from cache, pre-filled from environment's CFLAGS)

Remove "-O2 -g" from default CMAKE_C_FLAGS.
- Those are the RelWithDebInfo flags.
- They should be controlled from CMAKE_BUILD_TYPE

Removed overwrite of CMAKE_C_FLAGS_DEBUG.
- No overwriting allows control from cmake cache or cmdline
- -g is already the CMake default
- -O0 is already gcc's default

Leave CMAKE_BUILD_TYPE absent on those generators which don't use it.