System introspection (check includes, functions, types, etc) should be parallelized
When you use any of the Check*
modules to perform system introspection, such as verifying functions, libraries, types, etc are available, those operations should be parallelized. Basically what I would expect is:
- Configuration starts
- CMake runs all system introspection tasks in parallel (e.g. 8 core machine runs 8 cmake.exe instances to run 1 check each)
- Wait for all forks to finish and then resume configuration, using the results of that system introspection as needed (e.g.
configure_file()
) - Generate binary build files
Right now, when you configure CMake source code from scratch, it takes a LONG time to finish. Other projects that are very portable and adjust functionality dynamically based on system features also have this problem. CMake currently does all of these checks sequentially which is really slow on multicore systems.