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

Method CreateOutputFile

Source/cmGeneratorExpressionEvaluationFile.cxx:122–143  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

120}
121
122void 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
145void cmGeneratorExpressionEvaluationFile::Generate(cmLocalGenerator* lg)
146{

Callers 1

Calls 10

GetOutputFileNameMethod · 0.95
SetCMP0189Method · 0.80
GetGlobalGeneratorMethod · 0.45
GetEnabledLanguagesMethod · 0.45
GetMakefileMethod · 0.45
SetPropertyMethod · 0.45

Tested by

no test coverage detected