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

Method SettingsFileWrite

Source/cmQtAutoRcc.cxx:292–318  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

290}
291
292bool 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
321bool cmQtAutoRccT::TestQrcRccFiles(bool& generate)

Callers 1

ProcessMethod · 0.95

Calls 7

VerboseMethod · 0.80
InfoMethod · 0.80
cmStrCatFunction · 0.70
LogMethod · 0.45
MessagePathMethod · 0.45
ErrorMethod · 0.45
ReleaseMethod · 0.45

Tested by

no test coverage detected