[cmake-developers] [CMake 0013377]: SET_TARGET_PROPERTIES: TARGET_PDB overriden by OUTPUT_NAME

Mantis Bug Tracker mantis at public.kitware.com
Thu Jul 5 10:10:46 EDT 2012


The following issue has been SUBMITTED. 
====================================================================== 
http://public.kitware.com/Bug/view.php?id=13377 
====================================================================== 
Reported By:                Nodrev
Assigned To:                
====================================================================== 
Project:                    CMake
Issue ID:                   13377
Category:                   CMake
Reproducibility:            always
Severity:                   minor
Priority:                   normal
Status:                     new
====================================================================== 
Date Submitted:             2012-07-05 10:10 EDT
Last Modified:              2012-07-05 10:10 EDT
====================================================================== 
Summary:                    SET_TARGET_PROPERTIES: TARGET_PDB overriden by
OUTPUT_NAME
Description: 
when using both OUTPUT_NAME and TARGET_PDB properties, the pdb generated use
output_name to generate it's name, ignoring target_pdb that was explicitly
specified.

Steps to Reproduce: 
I have two projects in my msvc solution that i generate using cmake, an exe and
a dll, both are named with the same name ("myrealname" in the following
example). So, as every cmake's target must be unique, i set a "myrealname"
target for the exe and "mydummytarget" for the dll. I use
"SET_TARGET_PROPERTIES" to change the dummy target output filename:
 >>> set_target_properties(mydummytarget PROPERTIES OUTPUT_NAME myrealname) <<<
The problem with this setup, one of the too target pdb will be overwrited (as
they now both named "myrealname.pdb"). So I try to replace with this line:
 >>> set_target_properties(mydummytarget PROPERTIES OUTPUT_NAME myrealname
TARGET_PDB mydummytarget) <<<
But the "TARGET_PDB" command is ignored, the pdb that is generated is named
"myrealname.pdb" instead of "mydummytarget.pdb" (it seems that output_name is
used to generate the name of the pdb even when it's explicitly defined by the
user using target_pdb").
Maybe the problem is from cmTarget.cxx file, but i'm not an cmake source expert,
so i'm not sure about that.
====================================================================== 

Issue History 
Date Modified    Username       Field                    Change               
====================================================================== 
2012-07-05 10:10 Nodrev         New Issue                                    
======================================================================




More information about the cmake-developers mailing list