summaryrefslogtreecommitdiffstats
path: root/Source
diff options
context:
space:
mode:
authorBrad King <brad.king@kitware.com>2017-07-07 13:39:54 (GMT)
committerBrad King <brad.king@kitware.com>2017-07-07 14:12:15 (GMT)
commit9a34e95a41fff294a7fcd452cb3e78fd4ff021aa (patch)
treeee72009d3092136da8f8e0ebb02e396f70efcd4e /Source
parent372de3f8039f69b3a2edcf7120083ec4097f8bd3 (diff)
downloadCMake-9a34e95a41fff294a7fcd452cb3e78fd4ff021aa.zip
CMake-9a34e95a41fff294a7fcd452cb3e78fd4ff021aa.tar.gz
CMake-9a34e95a41fff294a7fcd452cb3e78fd4ff021aa.tar.bz2
Autogen: Skip generated files for compatibility with CMake 3.8
The change in commit v3.9.0-rc1~464^2~8 (Autogen: Add AUTOMOC/UIC support for generated source files, 2017-03-02) changes behavior of existing projects that may not expect `AUTOGEN` on generated files and do not yet set `SKIP_AUTOGEN` on them. Disable the behavior change for now to fix the regression for CMake 3.9. We can restore it later with a policy. In order to keep the implementation and tests working, add an undocumented property we can use in the tests to enable the behavior before the policy is introduced. Fixes: #17031 Issue: #16186
Diffstat (limited to 'Source')
-rw-r--r--Source/cmQtAutoGeneratorInitializer.cxx7
1 files changed, 7 insertions, 0 deletions
diff --git a/Source/cmQtAutoGeneratorInitializer.cxx b/Source/cmQtAutoGeneratorInitializer.cxx
index 6924ba2..cecf165 100644
--- a/Source/cmQtAutoGeneratorInitializer.cxx
+++ b/Source/cmQtAutoGeneratorInitializer.cxx
@@ -303,6 +303,13 @@ static void AcquireScanFiles(cmGeneratorTarget const* target,
!(fileType == cmSystemTools::HEADER_FILE_FORMAT)) {
continue;
}
+ if (PropertyEnabled(sf, "GENERATED") &&
+ !target->GetPropertyAsBool("__UNDOCUMENTED_AUTOGEN_GENERATED_FILES")) {
+ // FIXME: Add a policy whose NEW behavior allows generated files.
+ // The implementation already works. We disable it here to avoid
+ // changing behavior for existing projects that do not expect it.
+ continue;
+ }
const std::string absFile =
cmsys::SystemTools::GetRealPath(sf->GetFullPath());
// Skip flags