[Not "real" C++ code, benchmark is for compiling 14492754 copies of a fairly simple C function]
Both of those problems seemed solvable if he was willing to chunk up his application into libraries, maybe 1024 files per library then linked to the main application.
You can also use command files[1] to pass options in instead of using the command line.
[1] https://docs.microsoft.com/en-us/cpp/build/reference/linking... to pass
MinGW's linker supports passing the list of objects as a file for this reason and CMake will use that by default.