[cmake-developers] [CMake 0015286]: ExternalProject double build with parallel make and multiple targets

Mantis Bug Tracker mantis at public.kitware.com
Fri Dec 5 08:57:53 EST 2014


The following issue has been SUBMITTED. 
====================================================================== 
http://www.cmake.org/Bug/view.php?id=15286 
====================================================================== 
Reported By:                Jaak Ristioja
Assigned To:                
====================================================================== 
Project:                    CMake
Issue ID:                   15286
Category:                   CMake
Reproducibility:            always
Severity:                   major
Priority:                   normal
Status:                     new
====================================================================== 
Date Submitted:             2014-12-05 08:57 EST
Last Modified:              2014-12-05 08:57 EST
====================================================================== 
Summary:                    ExternalProject double build with parallel make and
multiple targets
Description: 
Given a project like this:

    cmake_minimum_required(VERSION 2.8.12)
    project(bad NONE)
    include(ExternalProject)
    ExternalProject_Add(a
      DOWNLOAD_COMMAND sleep 1
      CONFIGURE_COMMAND sleep 1
      BUILD_COMMAND sleep 1
      INSTALL_COMMAND date +%N | tee a)
    ExternalProject_Add(b
      DOWNLOAD_COMMAND sleep 1
      CONFIGURE_COMMAND sleep 1
      BUILD_COMMAND sleep 1
      INSTALL_COMMAND touch b
      DEPENDS a)

Running something like "make -j2 a b" causes target "a" to be built twice:

    [ 12%] [ 12%] Creating directories for 'a'
    Creating directories for 'a'
    [ 25%] [ 25%] Performing download step for 'a'
    Performing download step for 'a'
    [ 50%] [ 50%] [ 50%] [ 50%] No patch step for 'a'
    No update step for 'a'
    No update step for 'a'
    No patch step for 'a'
    [ 62%] [ 62%] Performing configure step for 'a'
    Performing configure step for 'a'
    [ 75%] [ 75%] Performing build step for 'a'
    Performing build step for 'a'
    [ 87%] [ 87%] Performing install step for 'a'
    Performing install step for 'a'
    506615761
    506738194
    [100%] [100%] Completed 'a'
    Completed 'a'
    [100%] [100%] Built target a
    Built target a
    Creating directories for 'b'
    Performing download step for 'b'
    No patch step for 'b'
    No update step for 'b'
    Performing configure step for 'b'
    Performing build step for 'b'
    Performing install step for 'b'
    Completed 'b'
    Built target b

Additional Information: 
Using CMake 2.8.12 and GNU make 4.0. This issue also seems to be have been
reported in the mailing list:
http://public.kitware.com/pipermail/cmake/2013-July/055214.html
====================================================================== 

Issue History 
Date Modified    Username       Field                    Change               
====================================================================== 
2014-12-05 08:57 Jaak Ristioja  New Issue                                    
======================================================================



More information about the cmake-developers mailing list