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

Method GenerateScriptNoConfig

Source/cmTestGenerator.cxx:249–266  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

247}
248
249void cmTestGenerator::GenerateScriptNoConfig(std::ostream& os, Indent indent)
250{
251 // Determine if policy CMP0110 is set to NEW.
252 bool const quote_test_name =
253 needToQuoteTestName(*this->Test->GetMakefile(), this->Test->GetName());
254 // Determine the number of equal-signs needed for quoting test name with
255 // [==[...]==] syntax.
256 std::string const equalSigns(
257 1 + countMaxConsecutiveEqualSigns(this->Test->GetName()), '=');
258
259 if (quote_test_name) {
260 os << indent << "add_test([" << equalSigns << "[" << this->Test->GetName()
261 << "]" << equalSigns << "] NOT_AVAILABLE)\n";
262 } else {
263 os << indent << "add_test(" << this->Test->GetName()
264 << " NOT_AVAILABLE)\n";
265 }
266}
267
268bool cmTestGenerator::NeedsScriptNoConfig() const
269{

Callers

nothing calls this directly

Calls 4

needToQuoteTestNameFunction · 0.85
GetMakefileMethod · 0.45
GetNameMethod · 0.45

Tested by

no test coverage detected