MantisBT - CMake
View Issue Details
0013377CMakeCMakepublic2012-07-05 10:102012-12-03 07:46
Nodrev 
 
normalminoralways
closedno change required 
MSVCMS Windows7
CMake 2.8.8 
 
0013377: SET_TARGET_PROPERTIES: TARGET_PDB overriden by OUTPUT_NAME
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.
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.
No tags attached.
Issue History
2012-07-05 10:10NodrevNew Issue
2012-07-05 16:05Brad KingNote Added: 0029921
2012-07-05 16:11NodrevNote Added: 0029922
2012-07-09 08:59Brad KingNote Added: 0029998
2012-07-09 08:59Brad KingStatusnew => resolved
2012-07-09 08:59Brad KingResolutionopen => no change required
2012-12-03 07:46David ColeNote Added: 0031811
2012-12-03 07:46David ColeStatusresolved => closed

Notes
(0029921)
Brad King   
2012-07-05 16:05   
There is no such property "TARGET_PDB". That string appears in the source code only in implementation details. AFAIK there is no property to set a custom .pdb file name.
(0029922)
Nodrev   
2012-07-05 16:11   
I found this command on cmake's documentation :/
http://www.cmake.org/Wiki/CMake_Useful_Variables [^]
Maybe it's not supported?
(0029998)
Brad King   
2012-07-09 08:59   
Re 0013377:0029922: That's not our official documentation. It's a contributor-maintained wiki. See the "reference documentation" linked from here:

 http://www.cmake.org/cmake/help/documentation.html [^]

The section of the wiki page you reference is talking about placeholder replacements that get done in "rule variables" that are set in platform files for the toolchain in use. They are an implementation detail and not officially documented. The wiki is incorrect that all of those can be set as properties.
(0031811)
David Cole   
2012-12-03 07:46   
Closing resolved issues that have not been updated in more than 4 months.