[ #27019 ] Refactor CMakeLists.txt to enable GCC 4.8 -Wzero-as-null-pointer-constant