Profile CMake code
With the profiling support in CMake 3.18, and later, you can find out where CMake is spending time configuring your project.
To view profiling information in the Chrome Trace Format Visualizer, select Analyze > CMake Profiler.
See also CMake and Chrome Trace Format Visualizer.