forked from qt-creator/qt-creator
CMakePM: Add CMake Profiler action
Change-Id: I17f258834724c37f0933d18b6214851be1965913 Reviewed-by: Alessandro Portale <alessandro.portale@qt.io>
This commit is contained in:
@@ -84,7 +84,8 @@ void FileApiReader::resetData()
|
||||
void FileApiReader::parse(bool forceCMakeRun,
|
||||
bool forceInitialConfiguration,
|
||||
bool forceExtraConfiguration,
|
||||
bool debugging)
|
||||
bool debugging,
|
||||
bool profiling)
|
||||
{
|
||||
qCDebug(cmakeFileApiMode) << "Parse called with arguments: ForceCMakeRun:" << forceCMakeRun
|
||||
<< " - forceConfiguration:" << forceInitialConfiguration
|
||||
@@ -109,6 +110,12 @@ void FileApiReader::parse(bool forceCMakeRun,
|
||||
}
|
||||
}
|
||||
|
||||
if (profiling) {
|
||||
const FilePath file = TemporaryDirectory::masterDirectoryFilePath() / "cmake-profile.json";
|
||||
args << "--profiling-format=google-trace"
|
||||
<< "--profiling-output=" + file.path();
|
||||
}
|
||||
|
||||
qCDebug(cmakeFileApiMode) << "Parameters request these CMake arguments:" << args;
|
||||
|
||||
const FilePath replyFile = FileApiParser::scanForCMakeReplyFile(m_parameters.buildDirectory);
|
||||
|
||||
Reference in New Issue
Block a user