mirror of
https://github.com/Kitware/CMake.git
synced 2026-04-27 01:19:31 -05:00
automoc: Remove existing output file before invoking moc
Remove the output file before invoking moc in case the case of source file has changed on disk. Recent versions of clang warn when the case of the include directive (which does change) doesn't match the case of the file on disk.
This commit is contained in:
@@ -1981,6 +1981,9 @@ void cmQtAutoMocUicT::JobCompileMocT::Process()
|
||||
std::string const& sourceFile = this->Mapping->SourceFile->FileName;
|
||||
std::string const& outputFile = this->Mapping->OutputFile;
|
||||
|
||||
// Remove output file in case the case of the source file has changed
|
||||
cmSystemTools::RemoveFile(outputFile);
|
||||
|
||||
// Compose moc command
|
||||
std::vector<std::string> cmd;
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user