View Issue Details Jump to Notes ] Print ]
IDProjectCategoryView StatusDate SubmittedLast Update
0015286CMakeCMakepublic2014-12-05 08:572015-05-04 09:05
ReporterJaak Ristioja 
Assigned To 
PrioritynormalSeveritymajorReproducibilityalways
StatusclosedResolutionduplicate 
PlatformOSOS Version
Product Version 
Target VersionFixed in Version 
Summary0015286: ExternalProject double build with parallel make and multiple targets
DescriptionGiven 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 InformationUsing 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 [^]
TagsNo tags attached.
Attached Files

 Relationships
duplicate of 0014312closedKitware Robot Parallel builds using make break when two or more targets that share a dependency (or are dependent) are called explicitly 

  Notes
(0037393)
Brad King (manager)
2014-12-05 09:15

Resolving as duplicate of 0014312. For GNU make this was fixed as described in 0014312:0034818 in CMake 3.0.
(0038691)
Robert Maynard (manager)
2015-05-04 09:05

Closing resolved issues that have not been updated in more than 4 months.

 Issue History
Date Modified Username Field Change
2014-12-05 08:57 Jaak Ristioja New Issue
2014-12-05 09:14 Brad King Relationship added duplicate of 0014312
2014-12-05 09:15 Brad King Note Added: 0037393
2014-12-05 09:15 Brad King Status new => resolved
2014-12-05 09:15 Brad King Resolution open => duplicate
2015-05-04 09:05 Robert Maynard Note Added: 0038691
2015-05-04 09:05 Robert Maynard Status resolved => closed


Copyright © 2000 - 2018 MantisBT Team