[CMake] add_library(foo SHARED...) is not creating a PDB file

Tom Kacvinsky tom.kacvinsky at vectorcast.com
Tue Sep 22 09:57:03 EDT 2015


On Tue, Sep 22, 2015 at 9:41 AM, Brad King <brad.king at kitware.com> wrote:

> On 09/22/2015 09:25 AM, Tom Kacvinsky wrote:
> > I am using cmake 2.8.11.2 on Windows 7 with Visual Studio 2008
> [snip]
> > whether listing the object files or compiling from source, there is
> > the cl option to create PDB debugging information.
>
> Please try with CMake 3.1 or higher:
>
>  http://www.cmake.org/Bug/view.php?id=14763
>
> There is a distinction between compiler-generated and linker-generated
> .pdb files.  See these target properties to configure each:
>
>  http://www.cmake.org/cmake/help/v3.3/prop_tgt/COMPILE_PDB_NAME.html
>
> http://www.cmake.org/cmake/help/v3.3/prop_tgt/COMPILE_PDB_OUTPUT_DIRECTORY.html
>  http://www.cmake.org/cmake/help/v3.3/prop_tgt/PDB_NAME.html
>  http://www.cmake.org/cmake/help/v3.3/prop_tgt/PDB_OUTPUT_DIRECTORY.html
>

I will give 3.3.2 a try.  In the meantime, I am getting a PDB file by
listing the source files for the add_library(commoncpp SHARED <srcs> <def
file>), but when I run in the visual studio debugger, it says there are no
symbols loaded for the DLL.  The PDB path recorded in the DLL points to the
right PDB file, but the PDB file typically is larger than the DLL. but in
this case it is not.  Is that because I am not gettin gall of thde bug
information, and a later version of cmake will guarantee that we get the
right information?
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://public.kitware.com/pipermail/cmake/attachments/20150922/7b9f9726/attachment.html>


More information about the CMake mailing list