MantisBT - CMake
View Issue Details
0008223CMakeCMakepublic2008-12-04 04:072009-09-30 16:04
Robert Lenhardt 
Brad King 
normalminoralways
closedfixed 
CMake-2-6 
 
0008223: Visual Studio 6 generator does not add targets to workspace in subdirs with EXCLUDE_FROM_ALL set
Lets say you have

./libtarget/CMakeLists.txt :
   add_library(lib ...)
./exetarget/CmakeLists.txt :
   add_subdirectory(../libtarget ... EXCLUDE_FROM_ALL)
   add_executable(exe ...)
   target_link_libraries(exe lib)

So exe is dependent on lib. The Visual Studio 6 generator correctly adds the lib project to the dependencies of exe, but the project itself is not added unlike the other Visual Studio generators.

I have made a patch and copied code from GlobalVisualStudio7Generator.cxx to GlobalVisualStudio6Generator.cxx. From my understanding this code uses GetTargetSets from GlobalGenerator to calculate the correct dependencies. This works for me, but someone with a better overview of the background should look over this.


No tags attached.
child of 0009568closed Brad King Visual Studio 6 generator issue 
patch cmGlobalVisualStudio6Generator.cxx.patch (9,371) 2008-12-04 04:07
https://public.kitware.com/Bug/file/1894/cmGlobalVisualStudio6Generator.cxx.patch
patch New-cmGlobalVisualStudio6Generator.cxx.patch (8,271) 2008-12-05 03:41
https://public.kitware.com/Bug/file/1895/New-cmGlobalVisualStudio6Generator.cxx.patch
Issue History
2008-12-04 04:07Robert LenhardtNew Issue
2008-12-04 04:07Robert LenhardtFile Added: cmGlobalVisualStudio6Generator.cxx.patch
2008-12-04 05:08Robert LenhardtNote Added: 0014286
2008-12-05 03:41Robert LenhardtFile Added: New-cmGlobalVisualStudio6Generator.cxx.patch
2008-12-05 03:43Robert LenhardtNote Added: 0014301
2009-09-30 12:30Bill HoffmanStatusnew => assigned
2009-09-30 12:30Bill HoffmanAssigned To => Brad King
2009-09-30 15:21Brad KingRelationship addedchild of 0009568
2009-09-30 16:04Brad KingNote Added: 0017854
2009-09-30 16:04Brad KingStatusassigned => closed
2009-09-30 16:04Brad KingResolutionopen => fixed

Notes
(0014286)
Robert Lenhardt   
2008-12-04 05:08   
One problem with this fix is that the ALL_BUILD target does not have dependencies added.
(0014301)
Robert Lenhardt   
2008-12-05 03:43   
Hi, i added a new patch which fully follows the way of the VisualStudio7 generator. This one adds correctly the ALL_BUILD target. Please test.
(0017854)
Brad King   
2009-09-30 16:04   
Your patch also helps address issue 0009568. Thanks!

I've committed changes based on both this patch and the one for that issue.

See issue 0009568 for details.