diff options
author | Stephen Kelly <steveire@gmail.com> | 2013-05-15 17:09:33 (GMT) |
---|---|---|
committer | Brad King <brad.king@kitware.com> | 2013-05-16 18:43:45 (GMT) |
commit | 33ed186fce561d274ffee1acd20c2ceb45931de4 (patch) | |
tree | 63c09cee674be81f96c7669a67322c876190ed5a /Source/cmQtAutomoc.cxx | |
parent | 5dd8c01429da90a7417b72f17e784cc98f70f57c (diff) | |
download | CMake-33ed186fce561d274ffee1acd20c2ceb45931de4.zip CMake-33ed186fce561d274ffee1acd20c2ceb45931de4.tar.gz CMake-33ed186fce561d274ffee1acd20c2ceb45931de4.tar.bz2 |
automoc: Read target defines unconditionally
Commit 429e3699 (Process COMPILE_DEFINITIONS as generator expressions
in QtAutomoc., 2013-01-25) introduced a check for the existence of the
COMPILE_DEFINITIONS property on the target before processing it.
At the time, compile definitions from linked targets were added to the
COMPILE_DEFINITIONS property by target_link_libraries. The way such
transitive compile definitions worked was changed in subsequent
commit a1c4905f (Use the link information as a source of compile
definitions and includes., 2013-02-12), so that the COMPILE_DEFINITIONS
property may be empty, despite the fact that there are definitions
which should be used.
Diffstat (limited to 'Source/cmQtAutomoc.cxx')
-rw-r--r-- | Source/cmQtAutomoc.cxx | 10 |
1 files changed, 3 insertions, 7 deletions
diff --git a/Source/cmQtAutomoc.cxx b/Source/cmQtAutomoc.cxx index a1fa31f..ff6f08c 100644 --- a/Source/cmQtAutomoc.cxx +++ b/Source/cmQtAutomoc.cxx @@ -280,13 +280,9 @@ void cmQtAutomoc::SetupAutomocTarget(cmTarget* target) _moc_incs += *incDirIt; } - const char* tmp = target->GetProperty("COMPILE_DEFINITIONS"); - std::string _moc_compile_defs; - if (tmp) - { - _moc_compile_defs = target->GetCompileDefinitions(0); - } - tmp = makefile->GetProperty("COMPILE_DEFINITIONS"); + std::string _moc_compile_defs = target->GetCompileDefinitions(0); + + const char* tmp = makefile->GetProperty("COMPILE_DEFINITIONS"); if (tmp) { _moc_compile_defs += ";"; |