<div dir="ltr">I've used the following a few times recently to get a sense of hotspots:<div><br></div><div><a href="https://gist.github.com/ihnorton/05f1dea38e596e75ba106855d490e66a">https://gist.github.com/ihnorton/05f1dea38e596e75ba106855d490e66a</a><br></div></div><br><div class="gmail_quote"><div dir="ltr">On Wed, Jun 20, 2018 at 10:17 AM Robert Dailey <<a href="mailto:rcdailey.lists@gmail.com">rcdailey.lists@gmail.com</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">I set my minimum required version to 3.6, which should enable those<br>
policies by default (if they're truly in 3.1 as you indicated).<br>
<br>
My CMake scripts do a lot of work to build a "tree" of properties<br>
connecting targets, so that I can recurse the targets my system<br>
generates to process things. CMake does not natively offer the ability<br>
to recurse targets created AFAIK. I suspect a lot of this logic is<br>
what is causing the slow down, but at this point I have no tooling to<br>
help me prove that.<br>
<br>
I have included the developer list, maybe the CMake developers have<br>
some insight for me as this doesn't seem to be a common user issue<br>
from what I can tell.<br>
<br>
On Wed, Jun 20, 2018 at 7:39 AM, Robert Maynard<br>
<<a href="mailto:robert.maynard@kitware.com" target="_blank">robert.maynard@kitware.com</a>> wrote:<br>
> I am not aware of any built in functionality that can generate<br>
> performance numbers for a project.<br>
><br>
> Have you made sure that the performance/parsing policies are set to<br>
> NEW or your cmake_minimum_required is sufficiently high, those can<br>
> have a significant improvement on configuration time.<br>
><br>
> Polices ( both in CMake 3.1 )<br>
> - CMP0054 'if parsing'<br>
> - CMP0053 'simplified variable reference and escape parsing'<br>
><br>
> On Tue, Jun 19, 2018 at 2:12 PM Robert Dailey <<a href="mailto:rcdailey.lists@gmail.com" target="_blank">rcdailey.lists@gmail.com</a>> wrote:<br>
>><br>
>> So I noticed over the years my CMake scripts take longer and longer to<br>
>> configure/generate. Is there a mechanism to tell which parts of my<br>
>> CMake scripts are slowest? I'd like to know how to optimize my CMake<br>
>> scripts to reduce the time it takes to generate projects.<br>
>> --<br>
>><br>
>> Powered by <a href="http://www.kitware.com" rel="noreferrer" target="_blank">www.kitware.com</a><br>
>><br>
>> Please keep messages on-topic and check the CMake FAQ at: <a href="http://www.cmake.org/Wiki/CMake_FAQ" rel="noreferrer" target="_blank">http://www.cmake.org/Wiki/CMake_FAQ</a><br>
>><br>
>> Kitware offers various services to support the CMake community. For more information on each offering, please visit:<br>
>><br>
>> CMake Support: <a href="http://cmake.org/cmake/help/support.html" rel="noreferrer" target="_blank">http://cmake.org/cmake/help/support.html</a><br>
>> CMake Consulting: <a href="http://cmake.org/cmake/help/consulting.html" rel="noreferrer" target="_blank">http://cmake.org/cmake/help/consulting.html</a><br>
>> CMake Training Courses: <a href="http://cmake.org/cmake/help/training.html" rel="noreferrer" target="_blank">http://cmake.org/cmake/help/training.html</a><br>
>><br>
>> Visit other Kitware open-source projects at <a href="http://www.kitware.com/opensource/opensource.html" rel="noreferrer" target="_blank">http://www.kitware.com/opensource/opensource.html</a><br>
>><br>
>> Follow this link to subscribe/unsubscribe:<br>
>> <a href="https://cmake.org/mailman/listinfo/cmake" rel="noreferrer" target="_blank">https://cmake.org/mailman/listinfo/cmake</a><br>
-- <br>
<br>
Powered by <a href="http://www.kitware.com" rel="noreferrer" target="_blank">www.kitware.com</a><br>
<br>
Please keep messages on-topic and check the CMake FAQ at: <a href="http://www.cmake.org/Wiki/CMake_FAQ" rel="noreferrer" target="_blank">http://www.cmake.org/Wiki/CMake_FAQ</a><br>
<br>
Kitware offers various services to support the CMake community. For more information on each offering, please visit:<br>
<br>
CMake Support: <a href="http://cmake.org/cmake/help/support.html" rel="noreferrer" target="_blank">http://cmake.org/cmake/help/support.html</a><br>
CMake Consulting: <a href="http://cmake.org/cmake/help/consulting.html" rel="noreferrer" target="_blank">http://cmake.org/cmake/help/consulting.html</a><br>
CMake Training Courses: <a href="http://cmake.org/cmake/help/training.html" rel="noreferrer" target="_blank">http://cmake.org/cmake/help/training.html</a><br>
<br>
Visit other Kitware open-source projects at <a href="http://www.kitware.com/opensource/opensource.html" rel="noreferrer" target="_blank">http://www.kitware.com/opensource/opensource.html</a><br>
<br>
Follow this link to subscribe/unsubscribe:<br>
<a href="https://cmake.org/mailman/listinfo/cmake-developers" rel="noreferrer" target="_blank">https://cmake.org/mailman/listinfo/cmake-developers</a><br>
</blockquote></div>