[cmake-developers] [CMake 0014929]: Dependencies of custom targets are built as part of "Build Solution" in Visual Studio

Mantis Bug Tracker mantis at public.kitware.com
Fri May 23 06:44:57 EDT 2014


The following issue has been SUBMITTED. 
====================================================================== 
http://www.cmake.org/Bug/view.php?id=14929 
====================================================================== 
Reported By:                Lars Christensen
Assigned To:                
====================================================================== 
Project:                    CMake
Issue ID:                   14929
Category:                   CMake
Reproducibility:            always
Severity:                   minor
Priority:                   low
Status:                     new
====================================================================== 
Date Submitted:             2014-05-23 06:44 EDT
Last Modified:              2014-05-23 06:44 EDT
====================================================================== 
Summary:                    Dependencies of custom targets are built as part of
"Build Solution" in Visual Studio
Description: 
If a CMakeLists.txt has two add_custom_target()'s where one is a dependency of
the other, the dependency gets built every time you "Build Solution" in Visual
Studio.

add_custom_target(foo DEPENDS main COMMAND cmd /c echo foo MESSAGE foo)
add_custom_target(bar DEPENDS foo COMMAND cmd /c echo bar MESSAGE bar)

In this case, the 'foo' target is selected for as a project to build every time
in the Visual Studio 'Configuration Manager'. 'bar' is NOT selected to build
every time, and is only build if built explicitly. If 'bar' is removed from
CMakeLists.txt, 'foo' is no longer built every time, and is deselected from
Build in the 'Configuration Manager'.

Neither 'foo' nor 'bar' is marked as a dependency of ALL_BUILD (As expected).
The problems is in the 'Configuration Manager', which selected which projects
are build when you choose 'Build Solution'.


====================================================================== 

Issue History 
Date Modified    Username       Field                    Change               
====================================================================== 
2014-05-23 06:44 Lars ChristensenNew Issue                                    
======================================================================



More information about the cmake-developers mailing list