[cmake-developers] cost of usage requirements
Brad King
brad.king at kitware.com
Tue Jul 15 09:47:54 EDT 2014
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
More information about the cmake-developers
mailing list