View Issue Details Jump to Notes ] Print ]
IDProjectCategoryView StatusDate SubmittedLast Update
0010830CMakeCMakepublic2010-06-14 17:352013-04-05 07:58
ReporterAndreas Johansen 
Assigned ToBrad King 
PrioritynormalSeverityfeatureReproducibilityalways
StatusclosedResolutionfixed 
PlatformOSOS Version
Product VersionCMake-2-8 
Target VersionCMake 2.8.10Fixed in VersionCMake 2.8.10 
Summary0010830: Add option to specify output of Visual Studio .pdb files (Debug symbols)
DescriptionI need to be able to either a: specify the output name of the debug symbols file, or b: specify the output directory for the debug symbols file. Currently CMake just grabs the output name of the target, and changes the file ending to .pdb leaving the debug symbols to always end up with the binary file.

In most cases this if fine, but I'm currently working with a project where there's two targets with the same output name (one is .exe and the other is .dll). The current system in CMake makes those two projects write out the exact same .pdb file (one overwriting the other) when both binaries are set to output in the same directory (won't overwrite each other).
TagsNo tags attached.
Attached Filespatch file icon set_debug_symbols_name.patch [^] (1,782 bytes) 2010-06-17 09:52 [Show Content]
patch file icon 0001-Add-target-property-PDB_NAME-to-set-MS-.pdb-names.patch [^] (1,971 bytes) 2010-12-15 10:19 [Show Content]
patch file icon 0001-PDB_NAME-target-property-to-set-full-PDB-file-path.patch [^] (4,251 bytes) 2011-01-25 03:34 [Show Content]
patch file icon 0001-Added-PDB_OUTPUT_DIRECTORY-and-PDB_NAME-as-target-pr.patch [^] (19,343 bytes) 2011-01-28 08:43 [Show Content]
patch file icon Added-PDB_OUTPUT_DIRECTORY-and-PDB_NAME-as-target-pr.patch [^] (19,057 bytes) 2012-09-22 04:48 [Show Content]
patch file icon 2-Added-PDB_OUTPUT_DIRECTORY-and-PDB_NAME-as-target-pr.patch [^] (19,686 bytes) 2012-09-22 08:30 [Show Content]
patch file icon loaden-v3-Added-PDB_OUTPUT_DIRECTORY-and-PDB_NAME-as-target-pr.patch [^] (21,091 bytes) 2012-09-22 10:24 [Show Content]
patch file icon loaden-V4-Added-PDB_OUTPUT_DIRECTORY-and-PDB_NAME-as-target-pr.patch [^] (21,090 bytes) 2012-09-22 10:52 [Show Content]
patch file icon loaden-V5-Added-PDB_OUTPUT_DIRECTORY-and-PDB_NAME-as-target-pr.patch [^] (21,180 bytes) 2012-09-22 21:15 [Show Content]
patch file icon loaden-V6-based-master-d550801a-Added-PDB_OUTPUT_DIRECTORY-and-PDB_NAME-as-target-pr.patch [^] (21,331 bytes) 2012-09-24 21:32 [Show Content]
patch file icon d550801a+0001-Add-PDB_OUTPUT_DIRECTORY-and-PDB_NAME-target-propert.patch [^] (21,380 bytes) 2012-09-25 15:26 [Show Content]
patch file icon d550801a+0002-Verify-that-PDB_-NAME-OUTPUT_DIRECTORY-are-honored-i.patch [^] (3,550 bytes) 2012-09-25 15:26 [Show Content]
patch file icon d550801a+0003-Document-that-PDB_-NAME-OUTPUT_DIRECTORY-are-ignored.patch [^] (3,512 bytes) 2012-09-25 15:26 [Show Content]

 Relationships
related to 0011899closedBrad King Put compiler's program database files into intermediate directory rather than output one for VS 2005 
related to 0014062closedBrad King Setting Compiler and Linker PDB to the same path in Visual Studio is unsupported. 

  Notes
(0021064)
Andreas Johansen (reporter)
2010-06-17 09:52
edited on: 2010-06-17 10:17

Attached a patch that adds "DEBUG_SYMBOLS_NAME" property for a target. When set, the VS7 generator will use this for the name of the .pdb file. Tested with VS2008.

(0023693)
Nodrev (reporter)
2010-12-03 09:39

Problem still exist, no options are provided
(0024153)
Brad King (manager)
2010-12-15 10:21

I propose patch

 0001-Add-target-property-PDB_NAME-to-set-MS-.pdb-names.patch

instead. I'd like to name the property "PDB_NAME" for now to reserve the name "SYMBOLS_NAME" until we have first-class support for debug symbol files on a cross-platform basis.

Meanwhile, please apply my version of the patch locally and amend it to add a test (possibly modifying one of the existing tests).
(0025064)
Thomas Bernard (reporter)
2011-01-25 03:34

May I propose a small variation of your other patch in order to be able to set the whole PDB file path using the PDB_NAME target property.
(0025068)
Brad King (manager)
2011-01-25 08:54

0010830:0025064: That would not be consistent with all the other properties ending in "_NAME". To accomplish that we would need a new "SYMBOLS_OUTPUT_DIRECTORY" (matching "SYMBOLS_NAME") similar to the current RUNTIME_OUTPUT_DIRECTORY, LIBRARY_OUTPUT_DIRECTORY, and ARCHIVE_OUTPUT_DIRECTORY properties. The advantage of a separate property for the directory is that it can be set for all targets by setting CMAKE_SYMBOLS_OUTPUT_DIRECTORY as a variable before creating targets. That makes it easy to put all .pdb files together.

Again, however, until we have full cross-platform debug symbol file support the name "SYMBOLS_" should be reserved. Therefore the name should be PDB_OUTPUT_DIRECTORY for now.

Can anyone pick up the patch mentioned in 0010830:0024153 and add the requested test?
(0025120)
Thomas Bernard (reporter)
2011-01-28 08:42

The patch 0001-Added-PDB_OUTPUT_DIRECTORY-and-PDB_NAME-as-target-pr.patch
is an improved version of the PDB_NAME patch which also implements the PDB_OUTPUT_DIRECTORY logic suggested by Brad.

I added a test for the properties but I don't know how the make the test fail if the pdb file names don't match what is expected. I've checked that manually for nmake, VS 2008 and 2010 targets.

The test at least makes sure the targets using the properties can be build.
(0025123)
Brad King (manager)
2011-01-28 10:32

0010830:0025120: Thanks, Thomas! I look forward to reviewing the patch as soon as I get a chance.
(0025599)
Brad King (manager)
2011-02-28 10:11

Issue 0011899 brings up a complicating factor. There is a distinction between the .pdb files generated by the compiler and those generated by the linker. The compiler-generated pdb is temporary for .dll and .exe targets so the output name/directory applies to that generated by the linker. However, for static libraries the compiler-generated pdb file *is* the .pdb file that goes with the static (.lib) library.
(0030479)
Brad King (manager)
2012-08-13 10:36

Sending issues I'm not actively working on to the backlog to await someone with time for them.

If an issue you care about is sent to the backlog when you feel it should have been addressed in a different manner, please bring it up on the CMake mailing list for discussion. Sign up for the mailing list here, if you're not already on it:

 http://www.cmake.org/mailman/listinfo/cmake [^]

It's easy to re-activate a bug here if you can find a CMake developer or contributor who has the bandwidth to take it on.
(0030961)
Yuchen Deng (reporter)
2012-09-09 00:20

I need change the pdb filename to support share PCH file using MSVC.
For now I can't find any valid way.
Can this patch still has chance to applied?
(0031084)
Yuchen Deng (reporter)
2012-09-22 04:54

Added-PDB_OUTPUT_DIRECTORY-and-PDB_NAME-as-target-pr.patch [^] (19,057 bytes) 2012-09-22 04:48

Rebase + cleanup + code_style_fix + test:STATIC->SHARED changed.
(0031085)
Yuchen Deng (reporter)
2012-09-22 08:31

2-Added-PDB_OUTPUT_DIRECTORY-and-PDB_NAME-as-target-pr.patch
Test can passed for STATIC lib.
But still failed for SHARED library.
Because can't create the .lib files.
(0031086)
Yuchen Deng (reporter)
2012-09-22 10:26

loaden-v3-Added-PDB_OUTPUT_DIRECTORY-and-PDB_NAME-as-target-pr.patch [^] (21,091 bytes) 2012-09-22 10:24 [Show Content]

Should works well now.
Fix all issue as I know.
Add Nanja Generator support.

Only tested on Command Line (Windows SDK 7.1).
(0031087)
Yuchen Deng (reporter)
2012-09-22 10:53

loaden-V4-Added-PDB_OUTPUT_DIRECTORY-and-PDB_NAME-as-target-pr.patch [^] (21,090 bytes) 2012-09-22 10:52

Pdb -> PDB
(0031088)
Yuchen Deng (reporter)
2012-09-22 21:16

loaden-V5-Added-PDB_OUTPUT_DIRECTORY-and-PDB_NAME-as-target-pr.patch [^] (21,180 bytes) 2012-09-22 21:15
- typo fix
- little change
(0031092)
Brad King (manager)
2012-09-24 09:38

Re 0010830:0031088: Thanks for working on this! The patch looks pretty good at quick glance.

On what version of CMake was this based? The patch does not apply cleanly on top of a recent master (f31de15b).
(0031098)
Yuchen Deng (reporter)
2012-09-24 21:26

It based the release branch. I will post a new patch for master soon.
(0031103)
Brad King (manager)
2012-09-25 15:28

Re 0010830:0031098: Thanks! I tweaked the patch for some style and documentation typos and extended the series with a test. Please try attached patches

 d550801a+0001-Add-PDB_OUTPUT_DIRECTORY-and-PDB_NAME-target-propert.patch
 d550801a+0002-Verify-that-PDB_-NAME-OUTPUT_DIRECTORY-are-honored-i.patch
 d550801a+0003-Document-that-PDB_-NAME-OUTPUT_DIRECTORY-are-ignored.patch

based on commit d550801a.
(0031108)
Yuchen Deng (reporter)
2012-09-27 02:47

Start 128: PDBDirectoryAndName
128/229 Test 0000128: PDBDirectoryAndName ......................... Passed 3.99 sec

It seems works well.
(0031109)
Brad King (manager)
2012-09-27 08:43

Applied:

 http://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=3f60dbf1 [^]
 http://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=b294457e [^]
 http://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=efc83b36 [^]
(0032462)
Robert Maynard (manager)
2013-03-04 08:38

Closing resolved issues that have not been updated in more than 4 months.

 Issue History
Date Modified Username Field Change
2010-06-14 17:35 Andreas Johansen New Issue
2010-06-17 09:52 Andreas Johansen Note Added: 0021064
2010-06-17 09:52 Andreas Johansen File Added: set_debug_symbols_name.patch
2010-06-17 10:16 Andreas Johansen Note Edited: 0021064
2010-06-17 10:17 Andreas Johansen Note Edited: 0021064
2010-12-03 09:39 Nodrev Note Added: 0023693
2010-12-15 09:55 David Cole Assigned To => Brad King
2010-12-15 09:55 David Cole Status new => assigned
2010-12-15 10:19 Brad King File Added: 0001-Add-target-property-PDB_NAME-to-set-MS-.pdb-names.patch
2010-12-15 10:21 Brad King Note Added: 0024153
2011-01-25 03:34 Thomas Bernard Note Added: 0025064
2011-01-25 03:34 Thomas Bernard File Added: 0001-PDB_NAME-target-property-to-set-full-PDB-file-path.patch
2011-01-25 08:54 Brad King Note Added: 0025068
2011-01-28 08:42 Thomas Bernard Note Added: 0025120
2011-01-28 08:43 Thomas Bernard File Added: 0001-Added-PDB_OUTPUT_DIRECTORY-and-PDB_NAME-as-target-pr.patch
2011-01-28 10:32 Brad King Note Added: 0025123
2011-02-28 09:02 Brad King Relationship added has duplicate 0011899
2011-02-28 09:02 Brad King Relationship deleted has duplicate 0011899
2011-02-28 09:32 Brad King Relationship added related to 0011899
2011-02-28 10:11 Brad King Note Added: 0025599
2012-08-13 10:36 Brad King Status assigned => backlog
2012-08-13 10:36 Brad King Note Added: 0030479
2012-09-09 00:20 Yuchen Deng Note Added: 0030961
2012-09-22 04:48 Yuchen Deng File Added: Added-PDB_OUTPUT_DIRECTORY-and-PDB_NAME-as-target-pr.patch
2012-09-22 04:54 Yuchen Deng Note Added: 0031084
2012-09-22 08:30 Yuchen Deng File Added: 2-Added-PDB_OUTPUT_DIRECTORY-and-PDB_NAME-as-target-pr.patch
2012-09-22 08:31 Yuchen Deng Note Added: 0031085
2012-09-22 10:24 Yuchen Deng File Added: loaden-v3-Added-PDB_OUTPUT_DIRECTORY-and-PDB_NAME-as-target-pr.patch
2012-09-22 10:26 Yuchen Deng Note Added: 0031086
2012-09-22 10:52 Yuchen Deng File Added: loaden-V4-Added-PDB_OUTPUT_DIRECTORY-and-PDB_NAME-as-target-pr.patch
2012-09-22 10:53 Yuchen Deng Note Added: 0031087
2012-09-22 21:15 Yuchen Deng File Added: loaden-V5-Added-PDB_OUTPUT_DIRECTORY-and-PDB_NAME-as-target-pr.patch
2012-09-22 21:16 Yuchen Deng Note Added: 0031088
2012-09-24 09:38 Brad King Note Added: 0031092
2012-09-24 21:26 Yuchen Deng Note Added: 0031098
2012-09-24 21:32 Yuchen Deng File Added: loaden-V6-based-master-d550801a-Added-PDB_OUTPUT_DIRECTORY-and-PDB_NAME-as-target-pr.patch
2012-09-25 15:25 Brad King Status backlog => assigned
2012-09-25 15:26 Brad King File Added: d550801a+0001-Add-PDB_OUTPUT_DIRECTORY-and-PDB_NAME-target-propert.patch
2012-09-25 15:26 Brad King File Added: d550801a+0002-Verify-that-PDB_-NAME-OUTPUT_DIRECTORY-are-honored-i.patch
2012-09-25 15:26 Brad King File Added: d550801a+0003-Document-that-PDB_-NAME-OUTPUT_DIRECTORY-are-ignored.patch
2012-09-25 15:28 Brad King Note Added: 0031103
2012-09-27 02:47 Yuchen Deng Note Added: 0031108
2012-09-27 08:43 Brad King Note Added: 0031109
2012-09-27 08:43 Brad King Status assigned => resolved
2012-09-27 08:43 Brad King Resolution open => fixed
2012-10-01 14:05 Brad King Fixed in Version => CMake 2.8.10
2012-10-01 14:05 Brad King Target Version => CMake 2.8.10
2013-03-04 08:38 Robert Maynard Note Added: 0032462
2013-03-04 08:38 Robert Maynard Status resolved => closed
2013-04-05 07:58 Brad King Relationship added related to 0014062


Copyright © 2000 - 2018 MantisBT Team