fix wrong debug macro
cmake: support debug flag