View Issue Details Jump to Notes ] Print ]
IDProjectCategoryView StatusDate SubmittedLast Update
0014430CMakeCMakepublic2013-09-21 07:282016-06-10 14:31
Reporterrgstr 
Assigned ToKitware Robot 
PrioritynormalSeverityminorReproducibilityalways
StatusclosedResolutionmoved 
PlatformUnix MakefilesOSLinux x86_64OS VersionFedora 19
Product VersionCMake 2.8.11 
Target VersionFixed in Version 
Summary0014430: LINK_DEPENDS dependency generated by custom command fails to build
DescriptionI'm using CMake to build an embedded project that requires a generated linker script.
The linker script is supposed to be generated via add_custom_command() and set_property(TARGET … PROPERTY LINK_DEPENDS …).

However CMake apparently does not create a Makefile target for the linker script and thus a subsequent call to make fails stating "No rule to make target …".
Steps To Reproduce1.) Download and extract attached minimal non-working example
2.) $ cmake . && make
3.) "make[2]: *** No rule to make target `linker_symbols.x', needed by `main'. Stop."
Additional InformationWhen adding the linker script dependency to one of the source files being built via add_property(SOURCE … PROPERTY OBJECT_DEPENDS …) everything works fine. Just uncomment the corresponding section in my CMakeLists.txt an rerun make.
TagsNo tags attached.
Attached Filesbz2 file icon cmake_mnwe.tar.bz2 [^] (674 bytes) 2013-09-21 07:28

 Relationships

  Notes
(0033862)
Brad King (manager)
2013-09-22 20:38

The output of a custom command must be listed as a source file in a target or it will not be associated with that target and included in the generated build rules for it. This convention superseded OBJECT_DEPENDS as of CMake 2.4 for purposes of bringing in custom commands to a target.

LINK_DEPENDS is independent of this and merely points at a list of files without caring where they come from. It is ignored on non-Makefile generators:

 http://www.cmake.org/cmake/help/v2.8.11/cmake.html#prop_tgt:LINK_DEPENDS [^]

and so does not make sense as a general-purpose property to bring in custom commands.
(0042372)
Kitware Robot (administrator)
2016-06-10 14:29

Resolving issue as `moved`.

This issue tracker is no longer used. Further discussion of this issue may take place in the current CMake Issues page linked in the banner at the top of this page.

 Issue History
Date Modified Username Field Change
2013-09-21 07:28 rgstr New Issue
2013-09-21 07:28 rgstr File Added: cmake_mnwe.tar.bz2
2013-09-22 20:38 Brad King Note Added: 0033862
2016-06-10 14:29 Kitware Robot Note Added: 0042372
2016-06-10 14:29 Kitware Robot Status new => resolved
2016-06-10 14:29 Kitware Robot Resolution open => moved
2016-06-10 14:29 Kitware Robot Assigned To => Kitware Robot
2016-06-10 14:31 Kitware Robot Status resolved => closed


Copyright © 2000 - 2018 MantisBT Team