| 152 | } |
| 153 | |
| 154 | void 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 | |
| 191 | void cmLocalVisualStudio7Generator::GenerateTarget(cmGeneratorTarget* target) |
| 192 | { |
no test coverage detected