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

Brad King brad.king at kitware.com
Tue Sep 22 09:41:31 EDT 2015


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

-Brad



More information about the CMake mailing list