generate .o files from compiler instead of .obj files

The extension is compiler-specific. Why does the extension matter in this case?

And the .c is always going to be there under CMake (some projects have foo.c and foo.cxx and CMake’s strategy avoids this conflict unconditionally).