MantisBT - CMake
View Issue Details
0008123CMakeCMakepublic2008-11-19 14:012016-06-10 14:30
Ralf Floca 
Bill Hoffman 
normaltextalways
closedmoved 
CMake-2-6 
 
0008123: Addressing an external MS project as target
There is the following situation: I use CMake as build control system (Windows platform, MS Visual Studio) for my own project (A). A depends on a second project (B). The project-files of B are pre generated and not covered by my CMake-Scripts. I use “INCLUDE_EXTERNAL_MSPROJECT” to integrate B into my solution.
Until this point everything works fine. But is there any way to address included external projects (like B) as a target in a CMake script. I would need this to add dependencies between A and B (e.g. ADD_DEPENDENCIES(A B)), so that B would also be build when I want to build A.
 
In the documentation and the mailing list I have found no information how to do this. And it seems that INCLUDE_EXTERNAL_MSPROJECT has no possibilities to introduce a Target identifier (like ADD_CUSTOM_TARGET)

Solution by Bill Hoffman:
>> include_external_msproject(B /some/path)
>>
>> add_dependencies(A INCLUDE_EXTERNAL_MSPROJECT_B)
>>

No tags attached.
related to 0009743closed Alex Neundorf Incorrect documentation of include_external_msproject() 
related to 0010920closed Bill Hoffman CMake allows name collisions between targets 
Issue History
2008-11-19 14:01Ralf FlocaNew Issue
2009-02-12 12:15Bill HoffmanNote Added: 0014914
2009-02-12 12:15Bill HoffmanStatusnew => assigned
2009-02-12 12:15Bill HoffmanAssigned To => Bill Hoffman
2010-06-30 19:04David ColeRelationship addedrelated to 0010920
2010-12-15 10:14David ColeRelationship addedrelated to 0009743
2016-06-10 14:27Kitware RobotNote Added: 0041470
2016-06-10 14:27Kitware RobotStatusassigned => resolved
2016-06-10 14:27Kitware RobotResolutionopen => moved
2016-06-10 14:30Kitware RobotStatusresolved => closed

Notes
(0014914)
Bill Hoffman   
2009-02-12 12:15   
It creates a target INCLUDE_EXTERNAL_MSPROJECT_B automatically. So, is this a documentation bug?
(0041470)
Kitware Robot   
2016-06-10 14:27   
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.