[cmake-developers] [CMake 0013122]: Allow inclusion of targets in generated solutions for Visual Studio
Mantis Bug Tracker
mantis at public.kitware.com
Wed Apr 11 12:46:04 EDT 2012
The following issue has been SUBMITTED.
======================================================================
http://public.kitware.com/Bug/view.php?id=13122
======================================================================
Reported By: void.pointer
Assigned To:
======================================================================
Project: CMake
Issue ID: 13122
Category: CMake
Reproducibility: always
Severity: feature
Priority: normal
Status: new
======================================================================
Date Submitted: 2012-04-11 12:46 EDT
Last Modified: 2012-04-11 12:46 EDT
======================================================================
Summary: Allow inclusion of targets in generated solutions
for Visual Studio
Description:
When generating for visual studio, the project() command results in a solution
being generated. Every target created thereafter will be included in this
solution. However, if project() is called from a subdirectory, then targets
created in parent directories will not be included in this solution *unless*
included targets have a dependency on those non-included targets.
For example, if I create a custom target that copies some files as a post-build
event, but that target is created in the root directory, I should be able to
specify that project() commands invoked in subdirectories include those targets
in its solution, for at least the purpose of having them available in the
solution for manual invocation.
One way to do this I suppose would be to add an optional parameter to the
project() command:
project( my_project INCLUDE parent_target1 parent_target2 )
Or a separate command could be created:
project_dependencies( my_project parent_target1 parent_target2 )
I also recommend adding some flags that determine whether or not those included
targets in the solution are built with the ALL_BUILD project or not (for
example, for custom targets you may not want this, and if you do need it, it
might be worth it to simply add a dependency to an existing target elsewhere).
Discussion on the CMake mailing list here:
http://www.cmake.org/pipermail/cmake/2012-April/049804.html
======================================================================
Issue History
Date Modified Username Field Change
======================================================================
2012-04-11 12:46 void.pointer New Issue
======================================================================
More information about the cmake-developers
mailing list