Commit e08d34ed authored by Brad King's avatar Brad King
Browse files

automoc: revert attempts to silence linker warning on macos

We've made several attempts to add a dummy symbol to `mocs_compilation.cpp`
when there are no automoc sources:

* commit 4a9daae4 (automoc: silence linker warning on macos,
                     2022-05-25, v3.24.0-rc1~55^2)
* commit 844244cc (automoc: avoid compiler warnings in linker-warning-
                     silencing code, 2022-08-10, v3.24.1~6^2)
* commit fc862838 (automoc: avoid more compiler warnings in linker-
                     warning-silencing code, 2022-08-29)

The last attempt derives a symbol name from the path to the source
file, but that breaks reproducible builds because it is not stable
w.r.t. the location of the build tree.  Revert all these attempts
for the 3.24 release series, and return to what 3.23 and below did.
Further investigation will be needed to resolve the original issue.

Fixes: #23937
Issue: #23551, #23823, #23823
parent 9a916eaa
Pipeline #296973 canceled with stages
in 52 minutes and 24 seconds
......@@ -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;
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment