The idea here would be to take advantage of the compilation database (the “compile_commands.json” file which CMake can generate when “-DCMAKE_EXPORT_COMPILE_COMMANDS=ON“ is passed when configuring), pick the compiler commands from there, and run them with “-fsyntax-only” added. Now, there is a slight complication: many of the compilation commands will need certain derived sources being generated before they can successfully run. It would be good to have a CMake target which depends on all the generated/derived sources, so we can run “ninja derived-sources” (or similar) and *then* run the “-fsyntax-only” checks.
Created attachment 388677 [details] Very WIP Patch
(In reply to Adrian Perez from comment #1) > Created attachment 388677 [details] > Very WIP Patch Some notes about this patch: - It does not add the target that prepares forwarding headers and derived sources. I have filed bug #206737 to do that separately. - This initial version of the patch predates bug #206597 and needs to be reworked a bit to take it into account. Anyway, I think sharing it may help out get a feeling of what I am trying to achieve here. The ultimate goal would be to see if we can get to the point of having an EWS builder that can quickly verify that a non-unified build would succeed.