| 124 | } |
| 125 | |
| 126 | void 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 | |
| 154 | void cmLocalVisualStudio7Generator::WriteStampFiles() |
| 155 | { |
no test coverage detected