diff options
author | Brad King <brad.king@kitware.com> | 2013-10-18 14:22:57 (GMT) |
---|---|---|
committer | Brad King <brad.king@kitware.com> | 2013-10-18 14:28:28 (GMT) |
commit | 216afc8a818c4f8906b17aefedbc9b9ed60564a8 (patch) | |
tree | b9c6ce50d27ba3ac50c1f5760cf91c6817638047 /Modules/Platform/Windows-MSVC-C.cmake | |
parent | c515dc574879448d66e2c5a27b9807d95a27fefd (diff) | |
download | CMake-216afc8a818c4f8906b17aefedbc9b9ed60564a8.zip CMake-216afc8a818c4f8906b17aefedbc9b9ed60564a8.tar.gz CMake-216afc8a818c4f8906b17aefedbc9b9ed60564a8.tar.bz2 |
MSVC: Add /FS flag for cl >= 18 to allow parallel compilation (#14492)
In generators such as Ninja that can run multiple "cl" processes that
refer to the same compiler .pdb file (/Fd) at the same time, MSVC from
Visual Studio 2013 complains:
fatal error C1041: cannot open program database '.../vc120.pdb';
if multiple CL.EXE write to the same .PDB file, please use /FS
According to "cl /?":
/FS force to use MSPDBSRV.EXE
Add the flag to compilation lines for this compiler version just after the
/Fd option.
Diffstat (limited to 'Modules/Platform/Windows-MSVC-C.cmake')
-rw-r--r-- | Modules/Platform/Windows-MSVC-C.cmake | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/Modules/Platform/Windows-MSVC-C.cmake b/Modules/Platform/Windows-MSVC-C.cmake index e81df9f..cbe1586 100644 --- a/Modules/Platform/Windows-MSVC-C.cmake +++ b/Modules/Platform/Windows-MSVC-C.cmake @@ -1,2 +1,5 @@ include(Platform/Windows-MSVC) +if(NOT CMAKE_C_COMPILER_VERSION VERSION_LESS 18.0) + set(_FS_C " /FS") +endif() __windows_compiler_msvc(C) |