Make cmake coloring work with Ninja

When using ninja generator, lines are a bit different from make:

    [2/89] Building CXX object CMakeFiles/qi.dir/src/path.cpp.o

I made some changes to do the same coloring than make