login Signup

Why is cmake progress printed out of order when run with emake?

Cmake-generated makefiles are fed into emake. The build works and parallelizes great, but the messages appear out of order:

``` [25%] ... [13%] ... [29%] ... ```

Since EA only prints in the correct serial order, why is this?

avatar image By tanay ♦ 3.4k asked Sep 11, 2014 at 06:42 PM
more ▼
(comments are locked)
avatar image john carey Sep 11, 2014 at 06:57 PM

To debug a scenario such as this, I would recommend using ElectricInsight to examine the commands and their associated output for the relevant jobs. ElectricInsight will tell you the serial order of the jobs.

avatar image tanay ♦ Nov 07, 2014 at 03:54 PM

Semi-related -- we've added a step-by-step tutorial for CMake acceleration with Huddle – our free build acceleration tool. Check it out here: http://electric-cloud.com/plugins/build-automation/cmake-acceleration

10|750 characters needed characters left

1 answer: sort voted first

Cmake assumes the build is being done serially, so the progress callbacks are designed to output under that assumption. However, Cmake produces multiple recursive makefiles. Emake can handle that just fine and produce correct builds, but the order of the callbacks will not be correct due to parallelization and Emake making decisions as to how to build the project.

To disable these messages, see the documentation for the RULE_MESSAGES Cmake property.

avatar image By juan 1.2k answered Sep 11, 2014 at 06:59 PM
more ▼
(comments are locked)
avatar image tanay ♦ Sep 12, 2014 at 03:07 AM

Thanks Juan! To add to this, I also got the following response from Eric:

The out-of-order output one is, I think, because cmake's progress report percentage is based more-or-less on "what's done right now". Of course emake runs things out-of-order, but prints them in serial order.

avatar image tanay ♦ Sep 12, 2014 at 03:08 AM

In other words, the output is in the correct order, but the percentage progress is not.

avatar image juan Nov 07, 2014 at 04:54 PM

Yes, that's just another way of saying the same thing. :)

10|750 characters needed characters left
Your answer
toggle preview:

Up to 8 attachments (including images) can be used with a maximum of 524.3 kB each and 1.0 MB total.