| 3014 | } |
| 3015 | |
| 3016 | cm::optional<cmSwiftCompileMode> cmLocalGenerator::GetSwiftCompileMode( |
| 3017 | cmGeneratorTarget const* target, std::string const& config) |
| 3018 | { |
| 3019 | cmMakefile const* mf = this->GetMakefile(); |
| 3020 | cmValue const swiftCompileModeDefault = |
| 3021 | mf->GetDefinition("CMAKE_Swift_COMPILATION_MODE_DEFAULT"); |
| 3022 | if (!cmNonempty(swiftCompileModeDefault)) { |
| 3023 | return {}; |
| 3024 | } |
| 3025 | cmValue swiftCompileMode = target->GetProperty("Swift_COMPILATION_MODE"); |
| 3026 | if (!swiftCompileMode) { |
| 3027 | swiftCompileMode = swiftCompileModeDefault; |
| 3028 | } |
| 3029 | |
| 3030 | std::string const expandedCompileMode = |
| 3031 | cmGeneratorExpression::Evaluate(*swiftCompileMode, this, config, target); |
| 3032 | if (expandedCompileMode == "wholemodule") { |
| 3033 | return cmSwiftCompileMode::Wholemodule; |
| 3034 | } |
| 3035 | if (expandedCompileMode == "singlefile") { |
| 3036 | return cmSwiftCompileMode::Singlefile; |
| 3037 | } |
| 3038 | if (expandedCompileMode == "incremental") { |
| 3039 | return cmSwiftCompileMode::Incremental; |
| 3040 | } |
| 3041 | return cmSwiftCompileMode::Unknown; |
| 3042 | } |
| 3043 | |
| 3044 | bool cmLocalGenerator::IsSplitSwiftBuild() const |
| 3045 | { |
no test coverage detected