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

Method TruncateOutputLog

Source/cmake.cxx:3636–3653  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

3634}
3635
3636void cmake::TruncateOutputLog(char const* fname)
3637{
3638 std::string fullPath = cmStrCat(this->GetHomeOutputDirectory(), '/', fname);
3639 struct stat st;
3640 if (::stat(fullPath.c_str(), &st)) {
3641 return;
3642 }
3643 if (!this->State->GetInitializedCacheValue("CMAKE_CACHEFILE_DIR")) {
3644 cmSystemTools::RemoveFile(fullPath);
3645 return;
3646 }
3647 off_t fsize = st.st_size;
3648 off_t const maxFileSize = 50 * 1024;
3649 if (fsize < maxFileSize) {
3650 // TODO: truncate file
3651 return;
3652 }
3653}
3654
3655void cmake::MarkCliAsUsed(std::string const& variable)
3656{

Callers 1

ActualConfigureMethod · 0.95

Calls 4

c_strMethod · 0.80
cmStrCatFunction · 0.70
statClass · 0.70

Tested by

no test coverage detected