mirror of
https://github.com/Kitware/CMake.git
synced 2026-02-18 13:10:17 -06:00
instrumentation: Don't load query files before configure
Prevent the duplication of callbacks that came from loading instrumentation queries both before and after configure.
This commit is contained in:
@@ -2664,7 +2664,6 @@ int cmake::ActualConfigure()
|
||||
this->ConfigureLog = cm::make_unique<cmConfigureLog>(
|
||||
cmStrCat(this->GetHomeOutputDirectory(), "/CMakeFiles"_s),
|
||||
this->FileAPI->GetConfigureLogVersions());
|
||||
this->Instrumentation->LoadQueries();
|
||||
this->Instrumentation->CheckCDashVariable();
|
||||
}
|
||||
#endif
|
||||
@@ -3109,10 +3108,6 @@ int cmake::Generate()
|
||||
<< ms.count() / 1000.0L << "s)";
|
||||
this->UpdateProgress(msg.str(), -1);
|
||||
}
|
||||
#if !defined(CMAKE_BOOTSTRAP)
|
||||
this->Instrumentation->CollectTimingData(
|
||||
cmInstrumentationQuery::Hook::PostGenerate);
|
||||
#endif
|
||||
if (!this->GraphVizFile.empty()) {
|
||||
std::cout << "Generate graphviz: " << this->GraphVizFile << '\n';
|
||||
this->GenerateGraphViz(this->GraphVizFile);
|
||||
@@ -3132,6 +3127,8 @@ int cmake::Generate()
|
||||
this->SaveCache(this->GetHomeOutputDirectory());
|
||||
|
||||
#if !defined(CMAKE_BOOTSTRAP)
|
||||
this->Instrumentation->CollectTimingData(
|
||||
cmInstrumentationQuery::Hook::PostGenerate);
|
||||
this->GlobalGenerator->WriteInstallJson();
|
||||
this->FileAPI->WriteReplies(cmFileAPI::IndexFor::Success);
|
||||
#endif
|
||||
|
||||
@@ -76,6 +76,9 @@ endif()
|
||||
|
||||
get_filename_component(dataDir ${index} DIRECTORY)
|
||||
get_filename_component(v1 ${dataDir} DIRECTORY)
|
||||
if (EXISTS ${v1}/${hook}.hook)
|
||||
add_error("Received multiple triggers of the same hook: ${hook}")
|
||||
endif()
|
||||
file(WRITE ${v1}/${hook}.hook "${ERROR_MESSAGE}")
|
||||
|
||||
if (NOT ERROR_MESSAGE MATCHES "^$")
|
||||
|
||||
Reference in New Issue
Block a user