Detect unsupported VS at configure time (and not at compile time)
@@ -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)
