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

Method GenerateTarget

Source/cmLocalVisualStudio7Generator.cxx:191–222  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

189}
190
191void cmLocalVisualStudio7Generator::GenerateTarget(cmGeneratorTarget* target)
192{
193 std::string const& lname = target->GetName();
194 cmGlobalVisualStudioGenerator* gg =
195 static_cast<cmGlobalVisualStudioGenerator*>(this->GlobalGenerator);
196 this->FortranProject = gg->TargetIsFortranOnly(target);
197 this->WindowsCEProject = gg->TargetsWindowsCE();
198
199 // add to the list of projects
200 target->Target->SetProperty("GENERATOR_FILE_NAME", lname);
201 // create the dsp.cmake file
202 std::string fname;
203 fname = cmStrCat(this->GetCurrentBinaryDirectory(), '/', lname);
204 if (this->FortranProject) {
205 fname += ".vfproj";
206 } else {
207 fname += ".vcproj";
208 }
209
210 // Generate the project file and replace it atomically with
211 // copy-if-different. We use a separate timestamp so that the IDE
212 // does not reload project files unnecessarily.
213 cmGeneratedFileStream fout(fname);
214 fout.SetCopyIfDifferent(true);
215 this->WriteVCProjFile(fout, lname, target);
216 if (fout.Close()) {
217 this->GlobalGenerator->FileReplacedDuringGenerate(fname);
218 }
219
220 this->WindowsCEProject = false;
221 this->FortranProject = false;
222}
223
224cmSourceFile* cmLocalVisualStudio7Generator::CreateVCProjBuildRule()
225{

Callers 1

GenerateMethod · 0.95

Calls 9

WriteVCProjFileMethod · 0.95
TargetIsFortranOnlyMethod · 0.80
SetCopyIfDifferentMethod · 0.80
CloseMethod · 0.80
cmStrCatFunction · 0.70
GetNameMethod · 0.45
TargetsWindowsCEMethod · 0.45
SetPropertyMethod · 0.45

Tested by

no test coverage detected