View Issue Details Jump to Notes ] Print ]
IDProjectCategoryView StatusDate SubmittedLast Update
0012057CMakeCMakepublic2011-04-07 18:362011-04-08 08:56
ReporterStephen Kelly 
Assigned ToBrad King 
PrioritynormalSeverityminorReproducibilityalways
StatusclosedResolutionduplicate 
PlatformOSOS Version
Product Version 
Target VersionFixed in VersionCMake 2.8.4 
Summary0012057: add_custom_command can not depend on a custom target
DescriptionFrom the docs:

http://www.cmake.org/cmake/help/cmake-2-8-docs.html#command:add_custom_command [^]

 DEPENDS specifies any target (created by an ADD_* command) a target-level dependency is created to make sure the target is built before any target using this custom command.

Steps To Reproduceproject(hello)

cmake_minimum_required(VERSION 2.8)
    
add_executable(hello hello.cpp)

add_custom_target(customTarget ALL COMMENT "CUSTOM TARGET")

add_custom_command(OUTPUT customCommandOutput COMMAND sleep 30 DEPENDS customTarget COMMENT "CUSTOM COMMAND")

add_custom_target(outtarget DEPENDS customCommandOutput COMMENT "OUT")

add_dependencies(hello outtarget)
Additional Information$ make
makeobj[0]: Entering directory `/home/kde-devel/dev/src/playground/cust_command_broken/build'
Scanning dependencies of target customTarget
[ 0%] CUSTOM TARGET
[ 25%] Built target customTarget
Scanning dependencies of target outtarget
make[2]: *** No rule to make target `customTarget', needed by `customCommandOutput'. Stop.
make[1]: *** [CMakeFiles/outtarget.dir/all] Error 2
make: *** [all] Error 2
makeobj[0]: Leaving directory `/home/kde-devel/dev/src/playground/cust_command_broken/build'
TagsNo tags attached.
Attached Files

 Relationships
duplicate of 0011332closedBrad King No dependency from ADD_CUSTOM_COMMAND to external project 

  Notes
(0026146)
Rolf Eike Beer (developer)
2011-04-07 18:55

Have you tried 2.8.4? This should have been fixed there.
(0026149)
Brad King (manager)
2011-04-08 08:56

This is a duplicate of issue 0011332 which was fixed for 2.8.4.

http://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=ced1d5ec [^]

 Issue History
Date Modified Username Field Change
2011-04-07 18:36 Stephen Kelly New Issue
2011-04-07 18:55 Rolf Eike Beer Note Added: 0026146
2011-04-08 08:56 Brad King Relationship added duplicate of 0011332
2011-04-08 08:56 Brad King Note Added: 0026149
2011-04-08 08:56 Brad King Status new => closed
2011-04-08 08:56 Brad King Assigned To => Brad King
2011-04-08 08:56 Brad King Resolution open => duplicate
2011-04-08 08:56 Brad King Fixed in Version => CMake 2.8.4


Copyright © 2000 - 2018 MantisBT Team