On 07/15/2014 07:00 AM, Stephen Kelly wrote:
> On 07/09/2014 05:12 PM, Brad King wrote:
>> Memory usage explodes during generation and CMake sometimes
>> runs out and crashes.
> 
> Is this affected in any way by the recent refactoring with the same
> motivation?

The refactoring so far does not help much directly, but it does
reduce some code duplication to make further improvements easier.

A small example that is a bit closer to what
happens in VTKWikiExamples is:

  cmake_minimum_required(VERSION 2.8.9)
  project(ManyLibs C)

  set(LibPrev)
  foreach(n RANGE 100)
    add_library(Lib${n} SHARED lib.c)
    target_link_libraries(Lib${n} LINK_PUBLIC ${LibPrev})
    set(LibPrev Lib${n})
  endforeach()
  foreach(n RANGE 100)
    add_executable(Exe${n} exe.c)
    target_link_libraries(Exe${n} ${LibPrev})
  endforeach()

On my machine:

  ========= ========= ========= ========
  version     real      user      sys
  ========= ========= ========= ========
  2.8.9     0m1.017s  0m0.912s  0m0.096s
  2.8.12.2  0m7.293s  0m7.156s  0m0.120s
  3.0.0     0m10.728s 0m10.384s 0m0.128s
  487b6ccd  0m20.819s 0m20.724s 0m0.092s
  7bc84502  0m11.390s 0m11.296s 0m0.084s
  ========= ========= ========= ========

The cleanup between 487b6ccd and 7bc84502 got this example
back to 3.0-ish time but nothing like 2.8.9.

-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

Reply via email to