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

Method WritePools

Source/cmLocalNinjaGenerator.cxx:315–341  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

313}
314
315void cmLocalNinjaGenerator::WritePools(std::ostream& os)
316{
317 cmGlobalNinjaGenerator::WriteDivider(os);
318
319 cmValue jobpools =
320 this->GetCMakeInstance()->GetState()->GetGlobalProperty("JOB_POOLS");
321 if (!jobpools) {
322 jobpools = this->GetMakefile()->GetDefinition("CMAKE_JOB_POOLS");
323 }
324 if (jobpools) {
325 cmGlobalNinjaGenerator::WriteComment(
326 os, "Pools defined by global property JOB_POOLS");
327 cmList pools{ *jobpools };
328 for (std::string const& pool : pools) {
329 std::string::size_type const eq = pool.find('=');
330 unsigned int jobs;
331 if (eq != std::string::npos &&
332 sscanf(pool.c_str() + eq, "=%u", &jobs) == 1) {
333 os << "pool " << pool.substr(0, eq) << "\n depth = " << jobs
334 << "\n\n";
335 } else {
336 cmSystemTools::Error("Invalid pool defined by property 'JOB_POOLS': " +
337 pool);
338 }
339 }
340 }
341}
342
343void cmLocalNinjaGenerator::WriteNinjaFilesInclusionConfig(std::ostream& os)
344{

Callers 1

GenerateMethod · 0.95

Calls 9

GetCMakeInstanceMethod · 0.95
GetGlobalPropertyMethod · 0.80
c_strMethod · 0.80
ErrorClass · 0.70
GetStateMethod · 0.45
GetDefinitionMethod · 0.45
GetMakefileMethod · 0.45
findMethod · 0.45
substrMethod · 0.45

Tested by

no test coverage detected