[cmake-developers] speed up package with mingw on Windows host

laurent laurent at mbdsys.com
Mon Jun 20 17:05:11 EDT 2016


I prefer : Laurent Tarrisse

Could you make the correction by yourself or do I need to re-send my patch with correct full name ?

I wonder if my next patch will not break packing with multi package ?

I mean dependencies will be marked as *analysed* at global scope.

Is cpack able to pack 2 binaries at the same time ?

Maybe i could suffix GET_PREREQUISITES_ANALYZED with something unique to the current main target (get_prerequisites has an argument called exepath )

Do you have some advices ?

Current patch state :

diff --git a/Modules/GetPrerequisites.cmake b/Modules/GetPrerequisites.cmake
index 1981040..9c5dfbc 100644
--- a/Modules/GetPrerequisites.cmake
+++ b/Modules/GetPrerequisites.cmake
@@ -944,10 +944,15 @@ function(get_prerequisites target prerequisites_var exclude_system recurse exepa
     list(SORT ${prerequisites_var})
   endif()
   if(${recurse})
-    set(more_inputs ${unseen_prereqs})
-    foreach(input ${more_inputs})
-      get_prerequisites("${input}" ${prerequisites_var} ${exclude_system} ${recurse} "${exepath}" "${dirs}" "${rpaths}")
-    endforeach()
+    if(NOT GET_PREREQUISITES_ANALYZED_${target})
+      set(GET_PREREQUISITES_ANALYZED_${target} True CACHE BOOL "GET_PREREQUISITES_ANALYSED_${target}")
+      set(more_inputs ${unseen_prereqs})
+      foreach(input ${more_inputs})
+        if(NOT GET_PREREQUISITES_ANALYZED_${input})
+          get_prerequisites("${input}" ${prerequisites_var} ${exclude_system} ${recurse} "${exepath}" "${dirs}" "${rpaths}")
+        endif()
+      endforeach()
+    endif()
   endif()
 
   set(${prerequisites_var} ${${prerequisites_var}} PARENT_SCOPE)


> Le 20 juin 2016 à 20:54, Brad King <brad.king at kitware.com> a écrit :
> 
> On 06/20/2016 02:49 PM, laurent wrote:
>> Let’s make a demonstration by example :
> 
> Thanks.
> 
>> Attached a git patch against current cmake master branch.
> 
> Thanks.  Actually I was saying that we would like to record a
> Full Name as your authorship.  Are you:
> 
> Tarrisse Laurent
> TARRISSE Laurent
> Tarrisse LAURENT
> 
> Laurent Tarrisse
> Laurent TARRISSE
> LAURENT Tarrisse
> 
> ?
> 
> Thanks,
> -Brad
> 
> -- 
> 
> Powered by www.kitware.com
> 
> Please keep messages on-topic and check the CMake FAQ at: http://www.cmake.org/Wiki/CMake_FAQ
> 
> Kitware offers various services to support the CMake community. For more information on each offering, please visit:
> 
> CMake Support: http://cmake.org/cmake/help/support.html
> CMake Consulting: http://cmake.org/cmake/help/consulting.html
> CMake Training Courses: http://cmake.org/cmake/help/training.html
> 
> Visit other Kitware open-source projects at http://www.kitware.com/opensource/opensource.html
> 
> Follow this link to subscribe/unsubscribe:
> http://public.kitware.com/mailman/listinfo/cmake-developers



More information about the cmake-developers mailing list