diff options
author | Brad King <brad.king@kitware.com> | 2019-12-18 10:28:27 (GMT) |
---|---|---|
committer | Brad King <brad.king@kitware.com> | 2019-12-18 10:34:27 (GMT) |
commit | 7fa7f55230fda5ac0135b1f4a220c15ad5983857 (patch) | |
tree | bfea0ed3fd5aedc07ba48262c134c8d4371925b2 /Source/cmQtAutoGenInitializer.cxx | |
parent | 4771c4e447c88a0e6a361d98c2c6f44ac7746ad3 (diff) | |
download | CMake-7fa7f55230fda5ac0135b1f4a220c15ad5983857.zip CMake-7fa7f55230fda5ac0135b1f4a220c15ad5983857.tar.gz CMake-7fa7f55230fda5ac0135b1f4a220c15ad5983857.tar.bz2 |
Autogen: Revert processing of .hh files for compatibility
Since commit 4a9154537c (Autogen: Use cmake::IsHeader/SourceExtension
for file type detection, 2019-07-02, v3.16.0-rc1~470^2~4) we process
`.hh` files with `AUTOMOC`. However, this change can break existing
projects that do not expect the behavior. Revert it for now. It can
be restored later via a policy.
Fixes: #20101
Diffstat (limited to 'Source/cmQtAutoGenInitializer.cxx')
-rw-r--r-- | Source/cmQtAutoGenInitializer.cxx | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/Source/cmQtAutoGenInitializer.cxx b/Source/cmQtAutoGenInitializer.cxx index a20f106..6b0fc1e 100644 --- a/Source/cmQtAutoGenInitializer.cxx +++ b/Source/cmQtAutoGenInitializer.cxx @@ -764,7 +764,8 @@ bool cmQtAutoGenInitializer::InitScanFiles() // Register files that will be scanned by moc or uic if (this->MocOrUicEnabled()) { - if (cm->IsHeaderExtension(extLower)) { + // FIXME: Add a policy to include .hh files. + if (cm->IsHeaderExtension(extLower) && extLower != "hh") { addMUFile(makeMUFile(sf, fullPath, true), true); } else if (cm->IsSourceExtension(extLower)) { addMUFile(makeMUFile(sf, fullPath, true), false); @@ -876,7 +877,8 @@ bool cmQtAutoGenInitializer::InitScanFiles() std::string const& extLower = cmSystemTools::LowerCase(sf->GetExtension()); - if (cm->IsHeaderExtension(extLower)) { + // FIXME: Add a policy to include .hh files. + if (cm->IsHeaderExtension(extLower) && extLower != "hh") { if (!cmContains(this->AutogenTarget.Headers, sf)) { auto muf = makeMUFile(sf, fullPath, false); if (muf->SkipMoc || muf->SkipUic) { |