Generating a toochain from a successful configuration

Hi, this is a follow-up of [this topic]( check_ipo_supported taking a long time ).

My actual goal is to launch a bunch of configuration commands on different projects (which are not defined as a submodule of a main project), with the same options.
But doing so, CMake starts each configuration with a set of redundant time consuming checks, (noticeably check_ipo_supported).

From the linked discussion, an idea would be to run only the first configuration with the said options, then “copy” the required information for the subsequent calls, in order not to perform the checks again. The technical way seem to generate a toolchain from the first run and use it for the next ones.

How can it be achieved (or is there another way to do that)?

Regards

A.

I’ve just realized that check_ipo_supported is a special case as I’m calling it explicitely. Thus the solution might be to set a some flag that can be reused between successive call. My issue is then to find a way to define the calls that are concerned.

But the question remains for all the compiler identification part (version, features, ABI checks,…).