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                                    
======================================================================

-- 

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