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

Method FixGlobalTargets

Source/cmLocalVisualStudio7Generator.cxx:126–152  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

124}
125
126void cmLocalVisualStudio7Generator::FixGlobalTargets()
127{
128 // Visual Studio .NET 2003 Service Pack 1 will not run post-build
129 // commands for targets in which no sources are built. Add dummy
130 // rules to force these targets to build.
131 auto const& tgts = this->GetGeneratorTargets();
132 for (auto const& l : tgts) {
133 if (l->GetType() == cmStateEnums::GLOBAL_TARGET) {
134 cmCustomCommandLines force_commands =
135 cmMakeSingleCommandLine({ "cd", "." });
136 std::string force = cmStrCat(this->GetCurrentBinaryDirectory(),
137 "/CMakeFiles/", l->GetName(), "_force");
138 if (cmSourceFile* sf =
139 this->Makefile->GetOrCreateGeneratedSource(force)) {
140 sf->SetProperty("SYMBOLIC", "1");
141 }
142 auto cc = cm::make_unique<cmCustomCommand>();
143 cc->SetOutputs(force);
144 cc->SetCommandLines(force_commands);
145 cc->SetComment(" ");
146 if (cmSourceFile* file =
147 this->AddCustomCommandToOutput(std::move(cc), true)) {
148 l->AddSource(file->ResolveFullPath());
149 }
150 }
151 }
152}
153
154void cmLocalVisualStudio7Generator::WriteStampFiles()
155{

Callers 1

AddHelperCommandsMethod · 0.95

Calls 12

cmMakeSingleCommandLineFunction · 0.85
moveFunction · 0.85
SetOutputsMethod · 0.80
SetCommandLinesMethod · 0.80
cmStrCatFunction · 0.70
GetTypeMethod · 0.45
GetNameMethod · 0.45
SetPropertyMethod · 0.45
SetCommentMethod · 0.45
AddSourceMethod · 0.45

Tested by

no test coverage detected