Merge pull request #434 from tbeu/detect-vs

Detect unsupported VS at configure time (and not at compile time)
This commit is contained in:
Sebastian Pipping 2020-12-27 20:49:36 +01:00 committed by GitHub
commit ad28b54fc2
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -124,6 +124,14 @@ if(EXPAT_WITH_LIBBSD)
endif()
endif()
if(MSVC)
# Minimum supported MSVC version is 1800 = Visual Studio 12.0/2013
# See also https://cmake.org/cmake/help/latest/variable/MSVC_VERSION.html
if(MSVC_VERSION VERSION_LESS 1800)
message(SEND_ERROR "MSVC_VERSION ${MSVC_VERSION} is not a supported Visual Studio compiler version. Please use Visual Studio 2013 or any later version.")
endif()
endif()
macro(_expat_copy_bool_int source_ref dest_ref)
if(${source_ref})
set(${dest_ref} 1)