View Issue Details Jump to Notes ] Print ]
IDProjectCategoryView StatusDate SubmittedLast Update
0009430CMakeCMakepublic2009-08-17 00:212009-09-17 09:18
ReporterIan Blumel 
Assigned ToBill Hoffman 
PrioritynormalSeverityfeatureReproducibilityalways
StatusclosedResolutionfixed 
PlatformOSOS Version
Product VersionCMake-2-6 
Target VersionFixed in Version 
Summary0009430: Set Browse Information flag for MSVC generators
DescriptionDevelopers at our software company would still like the ability to set the Browse Information flag for CMake generated projects.

With VC6 we could do this by adding a /Fr compiler flag, however, with VC7+ you can only do it via the actual project files. Unfortunately when the project files get regenerated we lose any browse information flag that was set.

Additional InformationThe attached patch will check to see if CMAKE_MSVC_BROWSE_INFO is "On".

If it is On then the browse information flag will be set in the Visual Studio projects.

I took my best shot at what I thought was a reasonable solution. I am open for any suggestions.

Couple of items about the patch:

 1. Patch was generated from trunk on August 16, 2009.

 1. I am not sure if using a CMAKE_MSVC_BROWSE_INFO variable the way to go here,
    but to me it seems like a global option. Something that would be a pain to
    configure on a project by project basis.

 2. The visual studio 6 generator needs a unique directory for each
    configuration.

 3. The other visual studio generators simply need to turn on a flag. In fact
    for the other generators I believe it is the only way to activate this
    feature.

 4. I attempted to document the new "CMAKE_MSVC_BROWSE_INFO" variable. I am
    not 100% that I picked the correct category.
TagsNo tags attached.
Attached Filespatch file icon msvc-browse-info.patch [^] (2,649 bytes) 2009-08-17 00:21 [Show Content]
patch file icon msvc-browse-info-2.patch [^] (2,678 bytes) 2009-09-15 02:08 [Show Content]
patch file icon msvc-browse-info-3.patch [^] (797 bytes) 2009-09-17 02:54 [Show Content]

 Relationships

  Notes
(0017141)
Ian Blumel (reporter)
2009-08-17 00:35

Further note.

I also think that if the CMAKE_MSVC_BROWSE_INFO is used. Then it needs to be set to Off, cached and marked as advanced. I am not 100% certain at the moment where I can do that, but I will fix up the patch when I find it.
(0017392)
Bill Hoffman (manager)
2009-09-11 17:36

What about /FR${CMAKE_CFG_INTDIR}
(0017523)
Ian Blumel (reporter)
2009-09-15 02:07

With Visual Studio 6 I found a better location to set the flag. All you have to do is set /FR and it will generate the proper browse information flag.

With the more modern VCPROJ files the /FR flag is not respected, and the only way to tell the compiler is via the "BrowseInformation" field in the project file.

I updated the patch with the attached: msvc-browse-info-2.patch

Let me know if it needs more work.
(0017530)
Bill Hoffman (manager)
2009-09-15 07:45

This a backwards way to do this. I don't want to create a CMake variable for every flag in MSVC, it should be done with command line flags. The problem is that it is not being put in the GUI. The flag map table needs to be updated for the /FR flag. It should scan the flags, find the /FR and then add the BrowseInformation=\"1\".
(0017581)
Ian Blumel (reporter)
2009-09-17 03:01

Your right, I had a feeling that my flag approach was a bad road to travel.

I discovered your "cmVS7FlagTable" (thanks for the hint), and created a one-liner patch. From what I can tell I think I can edit the VS7 "Local" table and all the other "modern" VS generators get the feature.

The patch adds it to the end of the table. At the moment I am not sure what the ordering is supposed to be or if it is significant.

Tested againts VC6 and VC9, if set the command line flags via,
 
   set(CMAKE_C_FLAGS "/FR")

it will properly set the GUI flag.
(0017585)
Bill Hoffman (manager)
2009-09-17 09:13

Looks better, thanks. For VS 10, the table is generated from xml specification files, so going forward this type of thing should not happen. For 6, it might not work, but I am not that concerned about it....
(0017586)
Bill Hoffman (manager)
2009-09-17 09:18

$ cvs commit -m "Bug 0009430, recognize the FR flag" cmLocalVisualStudio7Generator.cxx
Committer: Bill Hoffman <bill.hoffman@kitware.com>
/cvsroot/CMake/CMake/Source/cmLocalVisualStudio7Generator.cxx,v <-- cmLocalVisualStudio7Generator.cxx
new revision: 1.252; previous revision: 1.251

 Issue History
Date Modified Username Field Change
2009-08-17 00:21 Ian Blumel New Issue
2009-08-17 00:21 Ian Blumel File Added: msvc-browse-info.patch
2009-08-17 00:35 Ian Blumel Note Added: 0017141
2009-09-11 17:36 Bill Hoffman Note Added: 0017392
2009-09-11 17:36 Bill Hoffman Status new => assigned
2009-09-11 17:36 Bill Hoffman Assigned To => Bill Hoffman
2009-09-15 02:07 Ian Blumel Note Added: 0017523
2009-09-15 02:08 Ian Blumel File Added: msvc-browse-info-2.patch
2009-09-15 07:45 Bill Hoffman Note Added: 0017530
2009-09-17 02:54 Ian Blumel File Added: msvc-browse-info-3.patch
2009-09-17 03:01 Ian Blumel Note Added: 0017581
2009-09-17 09:13 Bill Hoffman Note Added: 0017585
2009-09-17 09:18 Bill Hoffman Note Added: 0017586
2009-09-17 09:18 Bill Hoffman Status assigned => closed
2009-09-17 09:18 Bill Hoffman Resolution open => fixed


Copyright © 2000 - 2018 MantisBT Team