[cmake-developers] CMake master slowdown in generation step

Nils Gladitz nilsgladitz at gmail.com
Fri Apr 4 08:55:15 EDT 2014


On 04/04/2014 02:51 PM, Brad King wrote:
> On 04/04/2014 06:45 AM, Nils Gladitz wrote:
>> CMake execution time of one of my projects jumps from 0m6.121s
>> (2.8.12.2) to 1m5.084s (3.0.20140404-gce0aa).
>>
>> Most time seems to be spend after "-- Configuring done".
>
> Please "git bisect" the problem.

Thanks, I found these two commits:
	8cd113ad1d715cc9ce865956870cd462d3659089
	042c1c834e69ee60b605b02bad8be87b2193a7d2


Stephen is already looking into it.
Problem seems to show with large numbers of source files e.g.:

cmake_minimum_required(VERSION 2.8.12)

foreach(INDEX RANGE 2000)
     set(SOURCE_FILE ${CMAKE_CURRENT_BINARY_DIR}/test_${INDEX}.cpp)
     set_property(SOURCE ${SOURCE_FILE} PROPERTY GENERATED ON)
     list(APPEND SOURCE_FILES ${SOURCE_FILE})

     file(GENERATE OUTPUT ${SOURCE_FILE} CONTENT "void foobar_${INDEX}(){}")
endforeach()

add_library(foobar ${SOURCE_FILES})


Nils



More information about the cmake-developers mailing list