[prev in list] [next in list] [prev in thread] [next in thread]
List: cmake
Subject: Re: [CMake] Time each target
From: Michael Ellery <mellery451 () gmail ! com>
Date: 2016-08-25 17:57:31
Message-ID: 3CDC0B4E-55F5-4064-BFA1-65B0D8FECAF4 () gmail ! com
[Download RAW message or body]
> On Aug 25, 2016, at 9:58 AM, Moreland, Kenneth <kmorel@sandia.gov> wrote:
>
> Does anyone know of a simple way to get CMake to time how long it takes to compile \
> each target? As it stands now, when compiling a CMake-managed project a status is \
> printed before each target is built. What I am looking for is a way to get CMake to \
> print a second status message after the target finishes building with a note on \
> what the wall time of the build was.
> -Ken
>
I don't know of any built-in support for this. I think Visual Studio projects might \
have a setting to generate timing info, but I suspect you are not using Visual \
Studio/MSbuild.
Here is an example of some build timing:
https://github.com/PointCloudLibrary/pcl/blob/master/CMakeLists.txt#L98
https://github.com/PointCloudLibrary/pcl/blob/master/cmake/custom_output.sh
..but I think it is providing timing for each compile command, not at the target \
level. In any event, this technique of using RULE_LAUNCH_COMPILE seems interesting - \
perhaps you can adopt it somehow.
The only other thing I can think of is to add custom targets around your real targets \
where POST depends on REAL which DEPENDS on PRE and the PRE and POST targets just \
print some timing info. Kludgy to be sure. HTH.
-Mike
--
Powered by www.kitware.com
Please keep messages on-topic and check the CMake FAQ at: \
http://www.cmake.org/Wiki/CMake_FAQ
Kitware offers various services to support the CMake community. For more information \
on each offering, please visit:
CMake Support: http://cmake.org/cmake/help/support.html
CMake Consulting: http://cmake.org/cmake/help/consulting.html
CMake Training Courses: http://cmake.org/cmake/help/training.html
Visit other Kitware open-source projects at \
http://www.kitware.com/opensource/opensource.html
Follow this link to subscribe/unsubscribe:
http://public.kitware.com/mailman/listinfo/cmake
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic