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

Óscar Fuentes ofv at wanadoo.es
Tue Mar 13 21:45:44 EDT 2012


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.




More information about the cmake-developers mailing list