Redo some CMake with a macro
restyled the code