[cmake-developers] [CMake 0014492]: Visual Studio 2013 breaks parallel command-line builds

Mantis Bug Tracker mantis at public.kitware.com
Thu Oct 17 16:07:27 EDT 2013


The following issue has been SUBMITTED. 
====================================================================== 
http://www.cmake.org/Bug/view.php?id=14492 
====================================================================== 
Reported By:                Nick Hutchinson
Assigned To:                
====================================================================== 
Project:                    CMake
Issue ID:                   14492
Category:                   CMake
Reproducibility:            always
Severity:                   major
Priority:                   normal
Status:                     new
====================================================================== 
Date Submitted:             2013-10-18 09:07 NZDT
Last Modified:              2013-10-18 09:07 NZDT
====================================================================== 
Summary:                    Visual Studio 2013 breaks parallel command-line
builds
Description: 
You get the following error:
fatal error C1041: cannot open program database 'XXXX.pdb'; if multiple CL.EXE
write to the same .PDB file, please use /FS

Adding `add_compile_options(/FS)` to a CMakeLists.txt works around the issue,
but CMake should probably add it in by default. Infuriatingly, Microsoft don't
appear to have documented this flag on MSDN[1].

1: http://msdn.microsoft.com/en-us/library/vstudio/fwkeyyhe(v=vs.120).aspx

Steps to Reproduce: 
With Ninja and Visual Studio 2013 installed (I tested with the Express edition),
open a vcvarsall.bat command prompt, and configure and build any CMake project.

E.g.
> cmake -GNinja -DCMAKE_C_COMPILER=cl -DCMAKE_CXX_COMPILER=cl
[PATH_TO_SOURCE_TREE]
> ninja -j2

====================================================================== 

Issue History 
Date Modified    Username       Field                    Change               
====================================================================== 
2013-10-18 09:07 Nick HutchinsonNew Issue                                    
======================================================================




More information about the cmake-developers mailing list