summaryrefslogtreecommitdiffstats
path: root/Modules/Platform/Windows-MSVC.cmake
diff options
context:
space:
mode:
authorBrad King <brad.king@kitware.com>2013-10-18 14:22:57 (GMT)
committerBrad King <brad.king@kitware.com>2013-10-18 14:28:28 (GMT)
commit216afc8a818c4f8906b17aefedbc9b9ed60564a8 (patch)
treeb9c6ce50d27ba3ac50c1f5760cf91c6817638047 /Modules/Platform/Windows-MSVC.cmake
parentc515dc574879448d66e2c5a27b9807d95a27fefd (diff)
downloadCMake-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.cmake')
-rw-r--r--Modules/Platform/Windows-MSVC.cmake2
1 files changed, 1 insertions, 1 deletions
diff --git a/Modules/Platform/Windows-MSVC.cmake b/Modules/Platform/Windows-MSVC.cmake
index 7036ba0..6e02e4a 100644
--- a/Modules/Platform/Windows-MSVC.cmake
+++ b/Modules/Platform/Windows-MSVC.cmake
@@ -232,7 +232,7 @@ macro(__windows_compiler_msvc lang)
set(CMAKE_${lang}_CREATE_STATIC_LIBRARY "<CMAKE_LINKER> /lib ${CMAKE_CL_NOLOGO} <LINK_FLAGS> /out:<TARGET> <OBJECTS> ")
set(CMAKE_${lang}_COMPILE_OBJECT
- "<CMAKE_${lang}_COMPILER> ${CMAKE_START_TEMP_FILE} ${CMAKE_CL_NOLOGO}${_COMPILE_${lang}} <FLAGS> <DEFINES> /Fo<OBJECT> /Fd<OBJECT_DIR>/ -c <SOURCE>${CMAKE_END_TEMP_FILE}")
+ "<CMAKE_${lang}_COMPILER> ${CMAKE_START_TEMP_FILE} ${CMAKE_CL_NOLOGO}${_COMPILE_${lang}} <FLAGS> <DEFINES> /Fo<OBJECT> /Fd<OBJECT_DIR>/${_FS_${lang}} -c <SOURCE>${CMAKE_END_TEMP_FILE}")
set(CMAKE_${lang}_CREATE_PREPROCESSED_SOURCE
"<CMAKE_${lang}_COMPILER> > <PREPROCESSED_SOURCE> ${CMAKE_START_TEMP_FILE} ${CMAKE_CL_NOLOGO}${_COMPILE_${lang}} <FLAGS> <DEFINES> -E <SOURCE>${CMAKE_END_TEMP_FILE}")
set(CMAKE_${lang}_CREATE_ASSEMBLY_SOURCE