Link error in Windows build with DBUILD_SHARED_LIBS=OFF
The following link error occurs when building with the option DBUILD_SHARED_LIBS=OFF in MSVC on Windows. It does not matter if "DSMP_IMPLEMENTATION_TYPE=Sequential" or not.
vtkCommonCore-9.3.lib(vtkSMPToolsAPI.obj) : error LNK2019: unresolved external symbol "public: bool __cdecl vtk::detail::smp::vtkSMPToolsImpl<1>::IsParallelScope(void)" (?IsParallelScope@?$vtkSMPToolsImpl@$00@smp@detail@vtk@@QEAA_NXZ) referenced in function "public: bool __cdecl vtk::detail::smp::vtkSMPToolsAPI::IsParallelScope(void)" (?IsParallelScope@vtkSMPToolsAPI@smp@detail@vtk@@QEAA_NXZ)
This error seems to be caused by the following MR:
!10027 (merged).
Indeed, when I revert this merge, the static library is created without any problems.
The same problem is reported at https://discourse.vtk.org/t/vtk-failed-to-build-due-to-error-lnk2019-and-error-lnk1120-on-windows-with-msvc/11671