Parcourir la source

Merge topic 'fix-moc-with-empty-COMPILE_DEFINITIONS'

33ed186 automoc: Read target defines unconditionally
Brad King il y a 12 ans
Parent
commit
5e993a2822
1 fichiers modifiés avec 3 ajouts et 7 suppressions
  1. 3 7
      Source/cmQtAutomoc.cxx

+ 3 - 7
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 += ";";