Merge topic 'extended-profiling'

0fe7aae91f cmake: Add profiling events for configure and generate
3d6a8d7eac cmMakefileProfilingData: Refactor to use RAII

Acked-by: Kitware Robot <kwrobot@kitware.com>
Tested-by: buildbot <buildbot@kitware.com>
Merge-request: !7828