Hi all, We have a rather big project and use cmake for building it. At some point our cmake scripts became very slow (around 4 minutes for single cmake run). We are thinking now how to speed up it. Searching the web and this list didn't give any results. It looks like there is no such thing as profiler for cmake scripts. Am I right?
What about adding such capability to cmake? It looks like cmake's trace provides enough info for time profiling, the only thing that it lacks is a time stamp. Below is a small patch that adds time stamp and nesting level (to simplify building a stack trace) to each trace line. Would it be possible to integrate this change to the main line or are there better options for time profiling of cmake? diff --git a/Source/cmMakefile.cxx b/Source/cmMakefile.cxx index 25ccbc7..0e6725c 100644 --- a/Source/cmMakefile.cxx +++ b/Source/cmMakefile.cxx @@ -361,6 +361,8 @@ bool cmMakefile::GetBacktrace(cmListFileBacktrace& backtrace) const void cmMakefile::PrintCommandTrace(const cmListFileFunction& lff) { cmOStringStream msg; + msg << "(" << std::fixed << cmSystemTools::GetTime(); + msg << ") (" << this->CallStack.size() << ") "; msg << lff.FilePath << "(" << lff.Line << "): "; msg << lff.Name << "("; for(std::vector<cmListFileArgument>::const_iterator i =
-- Powered by www.kitware.com Visit other Kitware open-source projects at http://www.kitware.com/opensource/opensource.html Please keep messages on-topic and check the CMake FAQ at: http://www.cmake.org/Wiki/CMake_FAQ Follow this link to subscribe/unsubscribe: http://www.cmake.org/mailman/listinfo/cmake