MantisBT - CMake
View Issue Details
0016101CMakeCMakepublic2016-05-12 04:072016-06-10 14:31
Robert Bielik 
Kitware Robot 
normalblockalways
closedmoved 
MacOS X10.11.3
CMake 3.5.2 
 
0016101: ADD_SUBDIRECTORY with EXCLUDE_FROM_ALL fails to include target dependencies(XCode Generator)
If the main target executable depends on targets that are in a subdirectory, using EXCLUDE_FROM_ALL in ADD_SUBDIRECTORY fails to include the target dependencies, leading to linking errors.

From documentation:
"Note that inter-target dependencies supercede this exclusion. If a target built by the parent project depends on a target in the subdirectory, the dependee target will be included in the parent project build system to satisfy the dependency"

This works fine for MSYS, Unix and Visual Studio generators, but NOT XCode.
No tags attached.
Issue History
2016-05-12 04:07Robert BielikNew Issue
2016-05-12 04:08Robert BielikNote Added: 0041057
2016-05-12 04:11Robert BielikNote Added: 0041058
2016-05-12 04:21Robert BielikNote Edited: 0041058bug_revision_view_page.php?bugnote_id=41058#r2107
2016-06-10 14:29Kitware RobotNote Added: 0043002
2016-06-10 14:29Kitware RobotStatusnew => resolved
2016-06-10 14:29Kitware RobotResolutionopen => moved
2016-06-10 14:29Kitware RobotAssigned To => Kitware Robot
2016-06-10 14:31Kitware RobotStatusresolved => closed

Notes
(0041057)
Robert Bielik   
2016-05-12 04:08   
Related to 0004209 and 0008365.
(0041058)
Robert Bielik   
2016-05-12 04:11   
(edited on: 2016-05-12 04:21)
Reason why this blocks, is that we use the INSTALL target and do NOT want all the INSTALL targets from sub projects included, so we have to use EXCLUDE_FROM_ALL, and with EXCLUDE_FROM_ALL, project fails to build.

(0043002)
Kitware Robot   
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.