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

Method WriteStampFiles

Source/cmLocalVisualStudio7Generator.cxx:154–189  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

152}
153
154void cmLocalVisualStudio7Generator::WriteStampFiles()
155{
156 // Touch a timestamp file used to determine when the project file is
157 // out of date.
158 std::string stampName =
159 cmStrCat(this->GetCurrentBinaryDirectory(), "/CMakeFiles");
160 cmSystemTools::MakeDirectory(stampName);
161 stampName += "/generate.stamp";
162 cmsys::ofstream stamp(stampName.c_str());
163 stamp << "# CMake generation timestamp file for this directory.\n";
164
165 // Create a helper file so CMake can determine when it is run
166 // through the rule created by CreateVCProjBuildRule whether it
167 // really needs to regenerate the project. This file lists its own
168 // dependencies. If any file listed in it is newer than itself then
169 // CMake must rerun. Otherwise the project files are up to date and
170 // the stamp file can just be touched.
171 std::string depName = cmStrCat(stampName, ".depend");
172 cmsys::ofstream depFile(depName.c_str());
173 depFile << "# CMake generation dependency list for this directory.\n";
174
175 std::vector<std::string> listFiles(this->Makefile->GetListFiles());
176 cmake* cm = this->GlobalGenerator->GetCMakeInstance();
177 if (cm->DoWriteGlobVerifyTarget()) {
178 listFiles.push_back(cm->GetGlobVerifyStamp());
179 }
180
181 // Sort the list of input files and remove duplicates.
182 std::sort(listFiles.begin(), listFiles.end(), std::less<std::string>());
183 auto new_end = std::unique(listFiles.begin(), listFiles.end());
184 listFiles.erase(new_end, listFiles.end());
185
186 for (std::string const& lf : listFiles) {
187 depFile << lf << '\n';
188 }
189}
190
191void cmLocalVisualStudio7Generator::GenerateTarget(cmGeneratorTarget* target)
192{

Callers 1

GenerateMethod · 0.95

Calls 8

c_strMethod · 0.80
push_backMethod · 0.80
eraseMethod · 0.80
cmStrCatFunction · 0.70
GetCMakeInstanceMethod · 0.45
beginMethod · 0.45
endMethod · 0.45

Tested by

no test coverage detected