Browse Source

Merge topic 'revert-automoc-silence-warnings'

e08d34eda1 automoc: revert attempts to silence linker warning on macos

Acked-by: Kitware Robot <[email protected]>
Acked-by: buildbot <[email protected]>
Merge-request: !7652
Brad King 3 years ago
parent
commit
39d2ceb4f1
1 changed files with 1 additions and 10 deletions
  1. 1 10
      Source/cmQtAutoMocUic.cxx

+ 1 - 10
Source/cmQtAutoMocUic.cxx

@@ -2175,18 +2175,9 @@ void cmQtAutoMocUicT::JobMocsCompilationT::Process()
 
   if (this->MocEval().CompFiles.empty()) {
     // 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 "
                "included\n"
-               "void " +
-      functionName +
-      "();\n"
-      "void " +
-      functionName + "() {}\n";
+               "enum some_compilers { need_more_than_nothing };\n";
   } else {
     // Valid content
     const bool mc = this->BaseConst().MultiConfig;