MCPcopy Create free account
hub / github.com/Kitware/CMake / addInstrumentationCommand

Function addInstrumentationCommand

Source/cmLocalUnixMakefileGenerator3.cxx:79–95  ·  view source on GitHub ↗

Helper function to add the Start Instrumentation command

Source from the content-addressed store, hash-verified

77#ifndef CMAKE_BOOTSTRAP
78// Helper function to add the Start Instrumentation command
79void addInstrumentationCommand(cmInstrumentation* instrumentation,
80 std::vector<std::string>& commands)
81{
82 if (instrumentation->HasQuery()) {
83 std::string instrumentationCommand =
84 "$(CTEST_COMMAND) --start-instrumentation $(CMAKE_BINARY_DIR)";
85# ifndef _WIN32
86 /*
87 * On Unix systems, Make will prefix the command with `/bin/sh -c`.
88 * Use exec so that Make is the parent process of the command.
89 * Add a `;` to convince BSD make to not optimize out the shell.
90 */
91 instrumentationCommand = cmStrCat("exec ", instrumentationCommand, " ;");
92# endif
93 commands.push_back(instrumentationCommand);
94 }
95}
96#endif
97
98// Helper predicate for removing absolute paths that don't point to the

Callers 2

WriteLocalAllRulesMethod · 0.85

Calls 3

HasQueryMethod · 0.80
push_backMethod · 0.80
cmStrCatFunction · 0.70

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…