|  | @@ -2167,22 +2167,23 @@ void cmQtAutoMocUicT::JobCompileUicT::Process()
 | 
											
												
													
														|  |  
 |  |  
 | 
											
												
													
														|  |  void cmQtAutoMocUicT::JobMocsCompilationT::Process()
 |  |  void cmQtAutoMocUicT::JobMocsCompilationT::Process()
 | 
											
												
													
														|  |  {
 |  |  {
 | 
											
												
													
														|  | 
 |  | +  std::string const& compAbs = this->MocConst().CompFileAbs;
 | 
											
												
													
														|  | 
 |  | +
 | 
											
												
													
														|  |    // Compose mocs compilation file content
 |  |    // Compose mocs compilation file content
 | 
											
												
													
														|  |    std::string content =
 |  |    std::string content =
 | 
											
												
													
														|  |      "// This file is autogenerated. Changes will be overwritten.\n";
 |  |      "// This file is autogenerated. Changes will be overwritten.\n";
 | 
											
												
													
														|  |  
 |  |  
 | 
											
												
													
														|  |    if (this->MocEval().CompFiles.empty()) {
 |  |    if (this->MocEval().CompFiles.empty()) {
 | 
											
												
													
														|  |      // Placeholder content
 |  |      // Placeholder content
 | 
											
												
													
														|  | 
 |  | +    cmCryptoHash hash(cmCryptoHash::AlgoSHA256);
 | 
											
												
													
														|  | 
 |  | +    const std::string hashedPath = hash.HashString(compAbs);
 | 
											
												
													
														|  | 
 |  | +    const std::string functionName =
 | 
											
												
													
														|  | 
 |  | +      "cmake_automoc_silence_linker_warning" + hashedPath;
 | 
											
												
													
														|  | 
 |  | +
 | 
											
												
													
														|  |      content += "// No files found that require moc or the moc files are "
 |  |      content += "// No files found that require moc or the moc files are "
 | 
											
												
													
														|  |                 "included\n"
 |  |                 "included\n"
 | 
											
												
													
														|  | -               "struct cmake_automoc_silence_linker_warning{\n"
 |  | 
 | 
											
												
													
														|  | -               "    virtual ~cmake_automoc_silence_linker_warning();\n"
 |  | 
 | 
											
												
													
														|  | -               "};\n"
 |  | 
 | 
											
												
													
														|  | -               "\n"
 |  | 
 | 
											
												
													
														|  | -               "inline "
 |  | 
 | 
											
												
													
														|  | -               "cmake_automoc_silence_linker_warning::"
 |  | 
 | 
											
												
													
														|  | -               "~cmake_automoc_silence_linker_warning()\n"
 |  | 
 | 
											
												
													
														|  | -               "{}\n";
 |  | 
 | 
											
												
													
														|  | 
 |  | +               "void " +
 | 
											
												
													
														|  | 
 |  | +      functionName + "() {}\n";
 | 
											
												
													
														|  |    } else {
 |  |    } else {
 | 
											
												
													
														|  |      // Valid content
 |  |      // Valid content
 | 
											
												
													
														|  |      const bool mc = this->BaseConst().MultiConfig;
 |  |      const bool mc = this->BaseConst().MultiConfig;
 | 
											
										
											
												
													
														|  | @@ -2191,7 +2192,6 @@ void cmQtAutoMocUicT::JobMocsCompilationT::Process()
 | 
											
												
													
														|  |      content += cmWrap(wrapFront, this->MocEval().CompFiles, wrapBack, "");
 |  |      content += cmWrap(wrapFront, this->MocEval().CompFiles, wrapBack, "");
 | 
											
												
													
														|  |    }
 |  |    }
 | 
											
												
													
														|  |  
 |  |  
 | 
											
												
													
														|  | -  std::string const& compAbs = this->MocConst().CompFileAbs;
 |  | 
 | 
											
												
													
														|  |    if (cmQtAutoGenerator::FileDiffers(compAbs, content)) {
 |  |    if (cmQtAutoGenerator::FileDiffers(compAbs, content)) {
 | 
											
												
													
														|  |      // Actually write mocs compilation file
 |  |      // Actually write mocs compilation file
 | 
											
												
													
														|  |      if (this->Log().Verbose()) {
 |  |      if (this->Log().Verbose()) {
 |