addin debug and detaild debug options to cmake
a few more comments