[cmake-developers] Profile Cmake scripts

Ben Boeckel ben.boeckel at kitware.com
Tue Jan 5 12:04:39 EST 2016


On Tue, Jan 05, 2016 at 09:18:49 +0100, Bartosz Kosiorek wrote:
> That's great news.
> What is the branch name/link to these improvement?
> Is it possible to push these improvements partially?

Because the changes are so pervasive, I'd like for the branch to be
bisectable, so every commit should pass the test suite on at least the
common platforms (make, ninja, visual studio, xcode).

    https://github.com/mathstuf/cmake/tree/dev/string-overloads

> Maybe CMake community could continue working on that improvement?

I have no problem with anyone taking over the branch as long as the
branch ends up bisectable. If anyone wants to take it over and put the
branch together, I can run the test suite.

> It will be great to create ticket, in which propose solution will be
> described.
> 
> BTW: Do you know why the Xcode and MS Visual Studio is slower than CMake
> one ?

As Petr said, it is because these generators generate a build for each
configuration. You can help this by removing configurations you don't
care about from CMAKE_CONFIGURATION_TYPES (like, say, MinSizeRel) to
help reduce the time.

There are also probably some places in the genex evaluator where
computed values could be cached to improve times (e.g., make a cache of
the transitive closure for each target's include directories, link
libraries, etc. when evaluating $<LINK_LIBRARIES:my_target> and
friends). Alternatively, cmTarget could cache them (but that may not be
as straight forward since cmTarget is editable while genex evaluation
occurs when everything is read-only). Not sure how much it would help
the multi-config generators since they already memoize
configuration-independent evaluations.

--Ben


More information about the cmake-developers mailing list