[mod] add debugging CFLAGS and CXXFLAGS to CMakeLists.txt, switch config via cmake -DCMAKE_BUILD_TYPE=Debug