On Wednesday, January 29, 2014 02:35:53 PM Dominik Bernhardt wrote:
> > -----Urspruengliche Nachricht-----
> > Von: Clinton Stimpson [mailto:clin...@elemtech.com]
> > Gesendet: Dienstag, 21. Januar 2014 16:10
> > An: cmake-developers@cmake.org
> > Cc: Bill Hoffman; Dominik Bernhardt
> > Betreff: Re: [cmake-developers] [CMake] CMake 2.8.12.201401116 is
> > much slower than 2.8.12.1
> 
> [...]
> 
> >> I'm surprised how this small change added a 20% slowdown.
> >> -set_property(DIRECTORY APPEND PROPERTY COMPILE_DEFINITIONS_DEBUG
> >> QT_DEBUG)
> >> +set_property(DIRECTORY APPEND PROPERTY COMPILE_DEFINITIONS $<$<NOT:
> >> $<CONFIG:Debug>>:QT_NO_DEBUG>)
> > 
> > I tried this project on Windows with CMake master (my own build) and
> > CMake (kitware build) and CMake master was slightly faster, then
> > modifying UseQt.cmake made it slightly faster still.
> > 
> > Dominik, if you are seeing a massive slowdown, can you narrow it down?
> > It may not be generator expression related at all.
> 
> I just tested it again with the latest master from today. For my
> particular project the configure step with the current master takes
> 290s. If I only replace the UseQt4.cmake in the master with the
> version from 2.8.12.1 the configure time goes down to 23s!!
> I'm also surprised that such a tiny change results in a slowdown of
> more than 1000%. But at least in my setup this is the case.

Can you try the attached modifications to Qt4Macros.cmake to see if it helps 
you?  And make sure you try it with the restored UseQt4.cmake file.

Clint
diff --git a/Modules/Qt4Macros.cmake b/Modules/Qt4Macros.cmake
index fd9819f..d1aaed1 100644
--- a/Modules/Qt4Macros.cmake
+++ b/Modules/Qt4Macros.cmake
@@ -84,19 +84,19 @@ macro (QT4_GET_MOC_FLAGS _moc_flags)
   foreach(_current ${_inc_DIRS})
     if("${_current}" MATCHES "\\.framework/?$")
       string(REGEX REPLACE "/[^/]+\\.framework" "" framework_path 
"${_current}")
-      set(${_moc_flags} ${${_moc_flags}} "-F${framework_path}")
+      list(APPEND ${_moc_flags} "-F${framework_path}")
     else()
-      set(${_moc_flags} ${${_moc_flags}} "-I${_current}")
+      list(APPEND ${_moc_flags} "-I${_current}")
     endif()
   endforeach()
 
   get_directory_property(_defines COMPILE_DEFINITIONS)
   foreach(_current ${_defines})
-    set(${_moc_flags} ${${_moc_flags}} "-D${_current}")
+    list(APPEND ${_moc_flags} "-D${_current}")
   endforeach()
 
   if(Q_WS_WIN)
-    set(${_moc_flags} ${${_moc_flags}} -DWIN32)
+    list(APPEND ${_moc_flags} -DWIN32)
   endif()
 
 endmacro()
-- 

Powered by www.kitware.com

Visit other Kitware open-source projects at 
http://www.kitware.com/opensource/opensource.html

Please keep messages on-topic and check the CMake FAQ at: 
http://www.cmake.org/Wiki/CMake_FAQ

Follow this link to subscribe/unsubscribe:
http://public.kitware.com/cgi-bin/mailman/listinfo/cmake-developers

Reply via email to