summaryrefslogtreecommitdiffstats
path: root/Tests
diff options
context:
space:
mode:
authorStephen Kelly <steveire@gmail.com>2013-11-04 09:51:37 (GMT)
committerBrad King <brad.king@kitware.com>2013-11-05 17:00:49 (GMT)
commita1b9465bf85621f80f02b9903aa7b38a74676df1 (patch)
treecef51402c9d1c72fe096f8f9a30c28ee4f4647ea /Tests
parentc515dc574879448d66e2c5a27b9807d95a27fefd (diff)
downloadCMake-a1b9465bf85621f80f02b9903aa7b38a74676df1.zip
CMake-a1b9465bf85621f80f02b9903aa7b38a74676df1.tar.gz
CMake-a1b9465bf85621f80f02b9903aa7b38a74676df1.tar.bz2
Automoc: Add directory-level COMPILE_DEFINITIONS to command line (#14535)
In commit 18412153 (Refactor cmTarget::GetCompileDefinitions..., 2013-06-06) cmQtAutomoc was refactored to get all compile definitions from the target instead of separately asking the target and querying the directory-level COMPILE_DEFINITIONS property value. While the generation process does integrate directory-level COMPILE_DEFINITIONS into the target definitions, this did not happen until after Automoc targets are constructed. Therefore the commit regressed use of directory-level definitions in Automoc targets. Factor the definition finalization logic out from the cmGlobalGenerator::CreateGeneratorTargets method into a new cmGlobalGenerator::FinalizeTargetCompileDefinitions method and call it before constructing Automoc targets. This will place the directory-level definitions into the target in time to use them for the Automoc targets. Extend the QtAutomoc test to cover this case.
Diffstat (limited to 'Tests')
-rw-r--r--Tests/QtAutomoc/foo.h5
1 files changed, 4 insertions, 1 deletions
diff --git a/Tests/QtAutomoc/foo.h b/Tests/QtAutomoc/foo.h
index 32d4c8d..f23ec07 100644
--- a/Tests/QtAutomoc/foo.h
+++ b/Tests/QtAutomoc/foo.h
@@ -16,7 +16,10 @@
#include <QObject>
-class Foo : public QObject
+class Foo
+#ifdef FOO
+ : public QObject
+#endif
{
Q_OBJECT
public: