| 120 | } |
| 121 | |
| 122 | void cmGeneratorExpressionEvaluationFile::CreateOutputFile( |
| 123 | cmLocalGenerator* lg, std::string const& config) |
| 124 | { |
| 125 | std::vector<std::string> enabledLanguages; |
| 126 | cmGlobalGenerator* gg = lg->GetGlobalGenerator(); |
| 127 | cmGeneratorTarget* target = lg->FindGeneratorTargetToUse(this->Target); |
| 128 | gg->GetEnabledLanguages(enabledLanguages); |
| 129 | |
| 130 | for (std::string const& lang : enabledLanguages) { |
| 131 | cm::GenEx::Context context(lg, config, lang); |
| 132 | context.SetCMP0189(this->PolicyStatusCMP0189); |
| 133 | std::string const name = this->GetOutputFileName(context, target); |
| 134 | cmSourceFile* sf = lg->GetMakefile()->GetOrCreateGeneratedSource(name); |
| 135 | |
| 136 | // Tell the build system generators that there is no build rule |
| 137 | // to generate the file. |
| 138 | sf->SetProperty("__CMAKE_GENERATED_BY_CMAKE", "1"); |
| 139 | |
| 140 | gg->SetFilenameTargetDepends( |
| 141 | sf, this->OutputFileExpr->GetSourceSensitiveTargets()); |
| 142 | } |
| 143 | } |
| 144 | |
| 145 | void cmGeneratorExpressionEvaluationFile::Generate(cmLocalGenerator* lg) |
| 146 | { |
no test coverage detected