From 432dd1b9dca25c84691edd9f78a15ae76e66fac3 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?D=C5=BEenan=20Zuki=C4=87?= Date: Fri, 16 Aug 2019 16:43:18 -0400 Subject: [PATCH] ENH: back-porting #1165 to support Visual Studio 2019 --- Modules/ThirdParty/VNL/src/vxl/CMakeLists.txt | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/Modules/ThirdParty/VNL/src/vxl/CMakeLists.txt b/Modules/ThirdParty/VNL/src/vxl/CMakeLists.txt index 71588c3be32..117fc4951bb 100644 --- a/Modules/ThirdParty/VNL/src/vxl/CMakeLists.txt +++ b/Modules/ThirdParty/VNL/src/vxl/CMakeLists.txt @@ -117,7 +117,11 @@ set( CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} ${VXL_EXTRA_CMAKE_EXE_ set( CMAKE_MODULE_LINKER_FLAGS "${CMAKE_MODULE_LINKER_FLAGS} ${VXL_EXTRA_CMAKE_MODULE_LINKER_FLAGS}" ) set( CMAKE_SHARED_LINKER_FLAGS "${CMAKE_SHARED_LINKER_FLAGS} ${VXL_EXTRA_CMAKE_SHARED_LINKER_FLAGS}" ) - +if(MSVC_VERSION GREATER_EQUAL 1920) +# Force synchronous writes of .pdb files for building VXL on MSVC 1920-1929 +# https://docs.microsoft.com/en-us/cpp/build/reference/fs-force-synchronous-pdb-writes?view=vs-201 + add_compile_options( "/FS" ) +endif() #------------------------------------------------------------------- #-- BUILD CONFIG OPTIONS