diff --git a/Help/manual/cmake-instrumentation.7.rst b/Help/manual/cmake-instrumentation.7.rst index 98d927003c..1f17fee913 100644 --- a/Help/manual/cmake-instrumentation.7.rst +++ b/Help/manual/cmake-instrumentation.7.rst @@ -203,8 +203,8 @@ key is required, but all other fields are optional. * ``postBuild`` (called when ``ninja`` or ``make`` completes) * ``preCMakeBuild`` (called when ``cmake --build`` is invoked) * ``postCMakeBuild`` (called when ``cmake --build`` completes) - * ``postInstall`` - * ``postTest`` + * ``postCMakeInstall`` + * ``postCTest`` ``preBuild`` and ``postBuild`` are not supported when using the :generator:`MSYS Makefiles` or :generator:`FASTBuild` generators. @@ -264,7 +264,7 @@ Example: ], "hooks": [ "postCMakeBuild", - "postInstall" + "postCMakeInstall" ], "options": [ "staticSystemInformation", diff --git a/Source/cmCTest.cxx b/Source/cmCTest.cxx index a60f2dc992..f6c4b14316 100644 --- a/Source/cmCTest.cxx +++ b/Source/cmCTest.cxx @@ -2673,7 +2673,7 @@ int cmCTest::ExecuteTests(std::vector const& args) return handler.ProcessHandler(); }; int ret = instrumentation.InstrumentCommand("ctest", args, processHandler); - instrumentation.CollectTimingData(cmInstrumentationQuery::Hook::PostTest); + instrumentation.CollectTimingData(cmInstrumentationQuery::Hook::PostCTest); if (ret < 0) { cmCTestLog(this, ERROR_MESSAGE, "Errors while running CTest\n"); if (!this->Impl->OutputTestOutputOnTestFailure) { diff --git a/Source/cmInstrumentationQuery.cxx b/Source/cmInstrumentationQuery.cxx index 6900884108..d453d5cc4c 100644 --- a/Source/cmInstrumentationQuery.cxx +++ b/Source/cmInstrumentationQuery.cxx @@ -20,9 +20,9 @@ std::vector const cmInstrumentationQuery::OptionString{ "cdashVerbose", "trace" }; std::vector const cmInstrumentationQuery::HookString{ - "postGenerate", "preBuild", "postBuild", - "preCMakeBuild", "postCMakeBuild", "postTest", - "postInstall", "prepareForCDash", "manual" + "postGenerate", "preBuild", "postBuild", + "preCMakeBuild", "postCMakeBuild", "postCTest", + "postCMakeInstall", "prepareForCDash", "manual" }; namespace ErrorMessages { diff --git a/Source/cmInstrumentationQuery.h b/Source/cmInstrumentationQuery.h index 1e10bd852d..feeb22d669 100644 --- a/Source/cmInstrumentationQuery.h +++ b/Source/cmInstrumentationQuery.h @@ -29,8 +29,8 @@ public: PostBuild, PreCMakeBuild, PostCMakeBuild, - PostTest, - PostInstall, + PostCTest, + PostCMakeInstall, PrepareForCDash, Manual }; diff --git a/Source/cmakemain.cxx b/Source/cmakemain.cxx index 7fc00ce961..90eedcdf1f 100644 --- a/Source/cmakemain.cxx +++ b/Source/cmakemain.cxx @@ -989,7 +989,8 @@ int do_install(int ac, char const* const* av) cm::append(cmd, av, av + ac); ret = instrumentation.InstrumentCommand( "cmakeInstall", cmd, [doInstall]() { return doInstall(); }); - instrumentation.CollectTimingData(cmInstrumentationQuery::Hook::PostInstall); + instrumentation.CollectTimingData( + cmInstrumentationQuery::Hook::PostCMakeInstall); return ret; #endif } diff --git a/Tests/RunCMake/Instrumentation/bad-hook-stderr.txt b/Tests/RunCMake/Instrumentation/bad-hook-stderr.txt index 6ef5f48f49..aca9bccce1 100644 --- a/Tests/RunCMake/Instrumentation/bad-hook-stderr.txt +++ b/Tests/RunCMake/Instrumentation/bad-hook-stderr.txt @@ -1,5 +1,5 @@ ^CMake Error: Could not load instrumentation queries from [^ ]+: bad-hook.json:3: Not a valid hook: "bad hook" - "hooks": \["bad hook", "postGenerate", "preCMakeBuild", "postCMakeBuild", "postInstall"\] + "hooks": \["bad hook", "postGenerate", "preCMakeBuild", "postCMakeBuild", "postCMakeInstall"\] \^$ diff --git a/Tests/RunCMake/Instrumentation/hooks-1-install-stdout.txt b/Tests/RunCMake/Instrumentation/hooks-1-install-stdout.txt index da0da3b7eb..a131a173e7 100644 --- a/Tests/RunCMake/Instrumentation/hooks-1-install-stdout.txt +++ b/Tests/RunCMake/Instrumentation/hooks-1-install-stdout.txt @@ -1 +1 @@ -.*\-\- postInstall$ +.*\-\- postCMakeInstall$ diff --git a/Tests/RunCMake/Instrumentation/hooks-2-test-stdout.txt b/Tests/RunCMake/Instrumentation/hooks-2-test-stdout.txt index 442a48c534..e3a0650239 100644 --- a/Tests/RunCMake/Instrumentation/hooks-2-test-stdout.txt +++ b/Tests/RunCMake/Instrumentation/hooks-2-test-stdout.txt @@ -1 +1 @@ -.*\-\- postTest$ +.*\-\- postCTest$ diff --git a/Tests/RunCMake/Instrumentation/query/bad-hook.json.in b/Tests/RunCMake/Instrumentation/query/bad-hook.json.in index 5f92ba0347..690416adb6 100644 --- a/Tests/RunCMake/Instrumentation/query/bad-hook.json.in +++ b/Tests/RunCMake/Instrumentation/query/bad-hook.json.in @@ -1,4 +1,4 @@ { "version": 1, - "hooks": ["bad hook", "postGenerate", "preCMakeBuild", "postCMakeBuild", "postInstall"] + "hooks": ["bad hook", "postGenerate", "preCMakeBuild", "postCMakeBuild", "postCMakeInstall"] } diff --git a/Tests/RunCMake/Instrumentation/query/cmake-command-trace.cmake b/Tests/RunCMake/Instrumentation/query/cmake-command-trace.cmake index 6ccf2c4082..972b3a762b 100644 --- a/Tests/RunCMake/Instrumentation/query/cmake-command-trace.cmake +++ b/Tests/RunCMake/Instrumentation/query/cmake-command-trace.cmake @@ -3,6 +3,6 @@ cmake_instrumentation( API_VERSION 1 DATA_VERSION 1 OPTIONS trace - HOOKS postBuild postInstall postTest + HOOKS postBuild postCMakeInstall postCTest CALLBACK ${CMAKE_COMMAND} -P ${hook_path} 0 1 ) diff --git a/Tests/RunCMake/Instrumentation/query/hooks-1.json.in b/Tests/RunCMake/Instrumentation/query/hooks-1.json.in index cfccf1420d..e61aa67a88 100644 --- a/Tests/RunCMake/Instrumentation/query/hooks-1.json.in +++ b/Tests/RunCMake/Instrumentation/query/hooks-1.json.in @@ -1,6 +1,6 @@ { "version": 1, - "hooks": ["preCMakeBuild", "postInstall"], + "hooks": ["preCMakeBuild", "postCMakeInstall"], "callbacks": ["@GET_HOOK@"], "options": ["staticSystemInformation"] } diff --git a/Tests/RunCMake/Instrumentation/query/hooks-2.json.in b/Tests/RunCMake/Instrumentation/query/hooks-2.json.in index ae18b09bce..6fd40c8f7d 100644 --- a/Tests/RunCMake/Instrumentation/query/hooks-2.json.in +++ b/Tests/RunCMake/Instrumentation/query/hooks-2.json.in @@ -1,5 +1,5 @@ { "version": 1, - "hooks": ["postGenerate", "postCMakeBuild", "postTest"], + "hooks": ["postGenerate", "postCMakeBuild", "postCTest"], "callbacks": ["@GET_HOOK@"] }