David patch 2

Some minor improvements to CMake file related to GNU compiler.