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

Method ForceOld

Source/cmVisualStudio10TargetGenerator.cxx:5974–5992  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

5972}
5973
5974bool cmVisualStudio10TargetGenerator::ForceOld(std::string const& source) const
5975{
5976 HANDLE h =
5977 CreateFileW(cmSystemTools::ConvertToWindowsExtendedPath(source).c_str(),
5978 FILE_WRITE_ATTRIBUTES, FILE_SHARE_WRITE, 0, OPEN_EXISTING,
5979 FILE_FLAG_BACKUP_SEMANTICS, 0);
5980 if (!h) {
5981 return false;
5982 }
5983
5984 FILETIME const ftime_20010101 = { 3365781504u, 29389701u };
5985 if (!SetFileTime(h, &ftime_20010101, &ftime_20010101, &ftime_20010101)) {
5986 CloseHandle(h);
5987 return false;
5988 }
5989
5990 CloseHandle(h);
5991 return true;
5992}
5993
5994void cmVisualStudio10TargetGenerator::GetCSharpSourceProperties(
5995 cmSourceFile const* sf, std::map<std::string, std::string>& tags)

Callers 1

WriteCustomRuleMethod · 0.95

Calls 1

c_strMethod · 0.80

Tested by

no test coverage detected