VTK failed with error C2039: 'min': is not a member of 'std' under /permissive- mode on MSVC
VTK failed due to "error C2039: 'min': is not a member of 'std'" under /permissive- mode on MSVC, we use VTK master branch latest srouce code. Could you please help take a look at this? Thanks in advance!
Steps to reproduce the behavior:
- git clone https://gitlab.kitware.com/vtk/vtk.git D:\VTK\src
- Open a VS 2017 x86 command prompt and browse to D:\VTK
- mkdir build_x86 && pushd build_x86
- set _CL_=/permissive-
- cmake -G "Visual Studio 15 2017" -DCMAKE_SYSTEM_VERSION=10.0.17134.0 -DBUILD_SHARED_LIBS=OFF -DBUILD_TESTING=ON -DBUILD_EXAMPLES=OFF -VTK_IGNORE_CMAKE_CXX11_CHECKS=TRUE ..\src
- msbuild /m /p:Configuration=Release;Platform=Win32 All_BUILD.vcxproj /t:Rebuild
Error Message:
D:\VTK\src\Common\Core\vtkBuffer.h(166): error C2039: 'min': is not a member of 'std' D:\VTK\src\Common\Core\vtkBuffer.h(166): error C2039: 'min': is not a member of 'std' D:\VTK\src\Common\Core\vtkBuffer.h(166): error C2039: 'min': is not a member of 'std' D:\VTK\src\Common\Core\vtkBuffer.h(166): error C2039: 'min': is not a member of 'std' D:\VTK\src\Common\Core\vtkBuffer.h(166): error C2039: 'min': is not a member of 'std'