Skipping CMake compiler checks

I don’t know about that because CMake extracts a lot of information from compilers that I’d be surprised if Meson cared much about. Please look at the CMakeFiles/$version/{CMakeSystem,CMake${lang}Compiler}.cmake files for things that CMake cares about. I don’t know how much of this can be stuffed into the cache ahead of time, but I doubt meson is going to be able to list out the _COMPILE_FEATURE variables well enough to be accurate. You could probably pre-populate some of it, but there’s no guarantee that future versions of CMake won’t want to have additional information either.

I don’t know what happens if you provide partial information, but fiddling around too much here is liable to get into sensitive areas where our compatibility guarantee does not hold so well.

Also, how are you extracting information? With imported targets being the norm now, there are issues with extracting information reliably. See this issue. In ParaView, we have some consumers that don’t use CMake and I ended up making this script to extract the information. It basically makes a full project and then asks the resulting build what’s going on and computes a diff of command line flags for a target which uses the targets in question with those that do not. Not pretty, but it’s the best that can be done with the tools CMake offers today.