[CMake] DLL and EXE with same base name: clash in VS.

Óscar Fuentes ofv at wanadoo.es
Wed Apr 6 04:34:22 EDT 2011


Michael Wild <themiwi at gmail.com> writes:

> On 04/06/2011 09:21 AM, Alexey Livshits wrote:
>>> We have a clang.exe and a clang.dll. While building, VS creates
>>> clang.pdb (for the executable) and clang.pdb (for the dll) which
>>> obviously is not right. Is there a way to tell VS to use a different
>>> name for the PDB?
>> 
>> You can use different project name for exe and set the output name via
>> OUTPUT_NAME property.
>
> CMake uses prefix+base+".pdb" to generate the PDB file name, however I
> didn't dig deep enough to find out what `base' is, just that it is
> obtained with cmTarget::GetName(). Whether that refers to the target
> name or the OUTPUT_NAME, I couldn't find out easily, so you'll have to
> experiment ;-)

It is OUTPUT_NAME. The target name for clang.dll is libclang and the
build creates clang.pdb (and clang.ilk ...)

If I understand correctly what Michael says, the .pdb file name is
hardcoded.



More information about the CMake mailing list