Hello. Is there any way to make the feature check phase run on multiple cores? What I mean is all the checks like:
-- Looking for dlopen
-- Looking for dlopen - not found
-- Looking for sys/epoll.h
-- Looking for sys/epoll.h - not found
-- Looking for sys/select.h
-- Looking for sys/select.h - not found
-- Looking for sys/inotify.h
-- Looking for sys/inotify.h - not found
-- Looking for sys/event.h
-- Looking for sys/event.h - not found
-- Looking for xlocale.h
-- Looking for xlocale.h - not found
-- Looking for sys/types.h
-- Looking for sys/types.h - found
-- Looking for stdint.h
-- Looking for stdint.h - found
-- Looking for stddef.h
-- Looking for stddef.h - found
They are prefectly parralelizable, just like make or ninja. Each check can be performed indenependently. In some cases, the configure phase is extremely long because it does all the 200 or more checks sequentially, even though the machine has 24 cores. Is there any way to fix that?
There was discussion of having try_compile, execute_process, and other commands take a “token” that can then be waited on later (as a batch) to allow concurrent processing in the background. I don’t know the status of any such feature though and can’t find the issue right now.
The question is why you test many of those at all. With some, this is just bad autotools habit. Or do all of these are optional code parts that cannot be replaced by simple ifdefs (like a simple ifndef _WIN32) in the code? Or by simply omitting compatibility for ancient systems.
Regarding the discussions around allowing concurrent calls to try_compile() and execute_process(), that has been on my mind lately for improving performance of FetchContent_MakeAvailable(). I’m potentially interested in looking at this, but I still have a few things ahead of it in my queue of things to work on.