| 3634 | } |
| 3635 | |
| 3636 | void 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 | |
| 3655 | void cmake::MarkCliAsUsed(std::string const& variable) |
| 3656 | { |
no test coverage detected