[cmake-developers] Ninja/VS: fixed PDB name

Peter Collingbourne peter at pcc.me.uk
Tue Mar 13 22:20:02 EDT 2012


On Wed, Mar 14, 2012 at 02:45:44AM +0100, Óscar Fuentes wrote:
> The compile and link commands executed by ninja contains the same
> option: /FdTARGET_PDB (TARGET_PDB here is literal text, not a
> placeholder.)  This is a simplified excerpt from a .ninja.log file:
> 
> 5969	11219	0	driver\CMakeFiles\foo.dir\foo.cpp.obj	"C:/Archivos de programa/Microsoft Visual Studio 10.0/VC/bin/cl.exe"   /nologo /DWIN32 /D_WINDOWS /W3 /Zm1000 /EHsc /GR /MD /O2 /Ob2 /D NDEBUG /TP /Fodriver\CMakeFiles\foo.dir\foo.cpp.obj /FdTARGET_PDB -c ..\..\..\..\driver\foo.cpp
> 
> 11219	11922	0	foo.exe	cmd.exe /c cd . && c:/apps/cmake/bin/cmake.exe -E vs_link_exe "C:/Archivos de programa/Microsoft Visual Studio 10.0/VC/bin/cl.exe"  /nologo driver\CMakeFiles\foo.dir\foo.cpp.obj /Fefoo.exe /FdTARGET_PDB -link  /version:0.0  /STACK:10000000 /machine:X86  /INCREMENTAL:NO  /subsystem:windows && cd .
> 
> 
> Please note how the compile command also has /FdTARGET_PDB, which makes
> no sense.
> 
> For executables, using the same /FdTARGET_PDB causes build failures when
> two or more executables are linked at the same time and the linker tries
> to create and lock the file TARGET_PDB for each of those executables.

Which version of cmake are you using?  Older versions of the ninja-generator
branch had this bug but it should now be fixed as of commit ae41323.

Thanks,
-- 
Peter



More information about the cmake-developers mailing list