View Issue Details Jump to Notes ] Print ]
IDProjectCategoryView StatusDate SubmittedLast Update
0008223CMakeCMakepublic2008-12-04 04:072009-09-30 16:04
ReporterRobert Lenhardt 
Assigned ToBrad King 
PrioritynormalSeverityminorReproducibilityalways
StatusclosedResolutionfixed 
PlatformOSOS Version
Product VersionCMake-2-6 
Target VersionFixed in Version 
Summary0008223: Visual Studio 6 generator does not add targets to workspace in subdirs with EXCLUDE_FROM_ALL set
DescriptionLets 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.


TagsNo tags attached.
Attached Filespatch file icon cmGlobalVisualStudio6Generator.cxx.patch [^] (9,371 bytes) 2008-12-04 04:07 [Show Content]
patch file icon New-cmGlobalVisualStudio6Generator.cxx.patch [^] (8,271 bytes) 2008-12-05 03:41 [Show Content]

 Relationships
child of 0009568closedBrad King Visual Studio 6 generator issue 

  Notes
(0014286)
Robert Lenhardt (reporter)
2008-12-04 05:08

One problem with this fix is that the ALL_BUILD target does not have dependencies added.
(0014301)
Robert Lenhardt (reporter)
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 (manager)
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.

 Issue History
Date Modified Username Field Change
2008-12-04 04:07 Robert Lenhardt New Issue
2008-12-04 04:07 Robert Lenhardt File Added: cmGlobalVisualStudio6Generator.cxx.patch
2008-12-04 05:08 Robert Lenhardt Note Added: 0014286
2008-12-05 03:41 Robert Lenhardt File Added: New-cmGlobalVisualStudio6Generator.cxx.patch
2008-12-05 03:43 Robert Lenhardt Note Added: 0014301
2009-09-30 12:30 Bill Hoffman Status new => assigned
2009-09-30 12:30 Bill Hoffman Assigned To => Brad King
2009-09-30 15:21 Brad King Relationship added child of 0009568
2009-09-30 16:04 Brad King Note Added: 0017854
2009-09-30 16:04 Brad King Status assigned => closed
2009-09-30 16:04 Brad King Resolution open => fixed


Copyright © 2000 - 2018 MantisBT Team