Windows: Drop Visual Studio 2013 support

This simplifies things a little. Building liblzma with VS2013 probably
still worked but building the command line tools was not supported.

Microsoft ended support for VS2013 on 2024-04.
This commit is contained in:
Lasse Collin 2024-06-15 18:07:04 +03:00
parent 5d5c92b262
commit 6a3c4aaa43
3 changed files with 10 additions and 13 deletions

View File

@ -160,6 +160,11 @@ if(OVERRIDE_O3_IN_C_FLAGS_RELEASE)
PROPERTY VALUE "${CMAKE_C_FLAGS_RELEASE}")
endif()
# Reject unsupported MSVC versions.
if(MSVC AND MSVC_VERSION LESS 1900)
message(FATAL_ERROR "Visual Studio older than 2015 is not supported")
endif()
# We need a compiler that supports enough C99 or newer (variable-length arrays
# aren't needed, those are optional in C11/C17). C11 is preferred since C11
# features may be optionally used if they are available.
@ -1700,7 +1705,7 @@ endif()
# xzdec and lzmadec
#############################################################################
if(HAVE_DECODERS AND (NOT MSVC OR MSVC_VERSION GREATER_EQUAL 1900))
if(HAVE_DECODERS)
foreach(XZDEC xzdec lzmadec)
add_executable("${XZDEC}"
src/common/sysdefs.h
@ -1757,7 +1762,7 @@ endif()
# lzmainfo
#############################################################################
if(HAVE_DECODERS AND (NOT MSVC OR MSVC_VERSION GREATER_EQUAL 1900))
if(HAVE_DECODERS)
add_executable(lzmainfo
src/common/sysdefs.h
src/common/tuklib_common.h

View File

@ -169,15 +169,11 @@ typedef unsigned char _Bool;
#include <string.h>
// Visual Studio 2013 update 2 supports only __inline, not inline.
// MSVC v19.0 / VS 2015 and newer support both.
// MSVC v19.00 (VS 2015 version 14.0) and later should work.
//
// MSVC v19.27 (VS 2019 version 16.7) added support for restrict.
// Older ones support only __restrict.
#ifdef _MSC_VER
# if _MSC_VER < 1900 && !defined(inline)
# define inline __inline
# endif
# if _MSC_VER < 1927 && !defined(restrict)
# define restrict __restrict
# endif

View File

@ -8,6 +8,8 @@ Introduction
liblzma got MSVC support in XZ Utils 5.2.0, and the xz, xzdec,
lzmadec, and lzmainfo command line tools in XZ Utils 5.6.0.
Visual Studio 2015 and later are supported.
NOTE: The *.exe files are linked against GNU getopt_long from
the "lib" directory. That code is under the GNU LGPLv2.1
and thus the matching source code must be provided when
@ -15,12 +17,6 @@ Introduction
the license requirements is to distribute the matching XZ Utils
source package alongside the *.exe files.
MSVC 2013 update 2 and later have enough C99 support to build
liblzma from XZ Utils 5.2.0 and later without modifications.
Visual Studio 2015 or later is required to build the command line
tools.
Building
--------