| 494 | |
| 495 | |
| 496 | Options PipelineManager::stageOptions(Stage& stage) |
| 497 | { |
| 498 | Options opts; |
| 499 | |
| 500 | std::string tag = stage.tag(); |
| 501 | if (tag.size()) |
| 502 | { |
| 503 | tag = "stage." + tag; |
| 504 | auto oi = m_stageOptions.find(tag); |
| 505 | if (oi != m_stageOptions.end()) |
| 506 | opts.add(oi->second); |
| 507 | } |
| 508 | // Tag-based options options override stagename-based options, so |
| 509 | // we call addConditional. |
| 510 | auto oi = m_stageOptions.find(stage.getName()); |
| 511 | if (oi != m_stageOptions.end()) |
| 512 | opts.addConditional(oi->second); |
| 513 | return opts; |
| 514 | } |
| 515 | |
| 516 | |
| 517 | std::vector<Stage *> PipelineManager::roots() const |