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

Method ValidateCustomCommand

Source/cmMakefile.cxx:1069–1085  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1067}
1068
1069bool cmMakefile::ValidateCustomCommand(
1070 cmCustomCommandLines const& commandLines) const
1071{
1072 // TODO: More strict?
1073 auto const it =
1074 std::find_if(commandLines.begin(), commandLines.end(),
1075 [](cmCustomCommandLine const& cl) {
1076 return !cl.empty() && !cl[0].empty() && cl[0][0] == '"';
1077 });
1078 if (it != commandLines.end()) {
1079 this->IssueMessage(
1080 MessageType::FATAL_ERROR,
1081 cmStrCat("COMMAND may not contain literal quotes:\n ", (*it)[0], '\n'));
1082 return false;
1083 }
1084 return true;
1085}
1086
1087cmTarget* cmMakefile::GetCustomCommandTarget(
1088 std::string const& target, cmObjectLibraryCommands objLibCommands,

Callers 4

AddUtilityCommandMethod · 0.95

Calls 5

IssueMessageMethod · 0.95
cmStrCatFunction · 0.70
beginMethod · 0.45
endMethod · 0.45
emptyMethod · 0.45

Tested by

no test coverage detected