| 6492 | } |
| 6493 | |
| 6494 | std::string cmGeneratorTarget::GetSwiftModuleDirectory( |
| 6495 | std::string const& config) const |
| 6496 | { |
| 6497 | // This is like the *_OUTPUT_DIRECTORY properties except that we don't have a |
| 6498 | // separate per-configuration target property. |
| 6499 | // |
| 6500 | // The property expands generator expressions. Multi-config generators append |
| 6501 | // a per-configuration subdirectory to the specified directory unless a |
| 6502 | // generator expression is used. |
| 6503 | bool appendConfigDir = true; |
| 6504 | std::string moduleDirectory; |
| 6505 | |
| 6506 | if (cmValue value = this->GetProperty("Swift_MODULE_DIRECTORY")) { |
| 6507 | moduleDirectory = cmGeneratorExpression::Evaluate( |
| 6508 | *value, this->LocalGenerator, config, this); |
| 6509 | appendConfigDir = *value == moduleDirectory; |
| 6510 | } |
| 6511 | if (moduleDirectory.empty()) { |
| 6512 | moduleDirectory = this->LocalGenerator->GetCurrentBinaryDirectory(); |
| 6513 | } |
| 6514 | if (appendConfigDir) { |
| 6515 | this->LocalGenerator->GetGlobalGenerator()->AppendDirectoryForConfig( |
| 6516 | "/", config, "", moduleDirectory); |
| 6517 | } |
| 6518 | return moduleDirectory; |
| 6519 | } |
| 6520 | |
| 6521 | std::string cmGeneratorTarget::GetSwiftModulePath( |
| 6522 | std::string const& config) const |
no test coverage detected