diff options
author | Brad King <brad.king@kitware.com> | 2022-09-07 14:32:40 (GMT) |
---|---|---|
committer | Brad King <brad.king@kitware.com> | 2022-09-07 14:35:17 (GMT) |
commit | e08d34eda13ac6e856f7038a09aa52cc92612a64 (patch) | |
tree | 990225822615bdaee230c4b781484785f05964fd /Source/cmQtAutoMocUic.cxx | |
parent | 9a916eaae3f9ddf668d1c4194b268738b1b18c9b (diff) | |
download | CMake-e08d34eda13ac6e856f7038a09aa52cc92612a64.zip CMake-e08d34eda13ac6e856f7038a09aa52cc92612a64.tar.gz CMake-e08d34eda13ac6e856f7038a09aa52cc92612a64.tar.bz2 |
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 4a9daae483 (automoc: silence linker warning on macos,
2022-05-25, v3.24.0-rc1~55^2)
* commit 844244ccdc (automoc: avoid compiler warnings in linker-warning-
silencing code, 2022-08-10, v3.24.1~6^2)
* commit fc8628389f (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
Diffstat (limited to 'Source/cmQtAutoMocUic.cxx')
-rw-r--r-- | Source/cmQtAutoMocUic.cxx | 11 |
1 files changed, 1 insertions, 10 deletions
diff --git a/Source/cmQtAutoMocUic.cxx b/Source/cmQtAutoMocUic.cxx index 8adaa6c..4753e61 100644 --- a/Source/cmQtAutoMocUic.cxx +++ b/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; |