| 290 | } |
| 291 | |
| 292 | bool cmQtAutoRccT::SettingsFileWrite() |
| 293 | { |
| 294 | // Only write if any setting changed |
| 295 | if (this->SettingsChanged_) { |
| 296 | if (this->Log().Verbose()) { |
| 297 | this->Log().Info(GenT::RCC, |
| 298 | "Writing settings file " + |
| 299 | this->MessagePath(this->SettingsFile_)); |
| 300 | } |
| 301 | // Write settings file |
| 302 | std::string content = cmStrCat("rcc:", this->SettingsString_, '\n'); |
| 303 | std::string error; |
| 304 | if (!FileWrite(this->SettingsFile_, content, &error)) { |
| 305 | this->Log().Error(GenT::RCC, |
| 306 | cmStrCat("Writing of the settings file ", |
| 307 | this->MessagePath(this->SettingsFile_), |
| 308 | " failed.\n", error)); |
| 309 | // Remove old settings file to trigger a full rebuild on the next run |
| 310 | cmSystemTools::RemoveFile(this->SettingsFile_); |
| 311 | return false; |
| 312 | } |
| 313 | } |
| 314 | |
| 315 | // Unlock the lock file |
| 316 | this->LockFileLock_.Release(); |
| 317 | return true; |
| 318 | } |
| 319 | |
| 320 | /// Do basic checks if rcc generation is required |
| 321 | bool cmQtAutoRccT::TestQrcRccFiles(bool& generate) |