]> git.ipfire.org Git - thirdparty/xz.git/commitdiff
Windows: Drop Visual Studio 2013 support
authorLasse Collin <lasse.collin@tukaani.org>
Sat, 15 Jun 2024 15:07:04 +0000 (18:07 +0300)
committerLasse Collin <lasse.collin@tukaani.org>
Thu, 20 Jun 2024 18:53:07 +0000 (21:53 +0300)
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.

CMakeLists.txt
src/common/sysdefs.h
windows/INSTALL-MSVC.txt

index a50c8a6b731d75517bd66797359061ab8a5d3da2..542df74259fa6a6cdcf4ddecdca851f7466d4fc8 100644 (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
index 2f9740367ae907ee881ef076da42970216dac51a..0d08fc9f2109970d64719ae70532db385b197d93 100644 (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
index ba483fb6087a0b3a912cbfce80da4ddc33f46f94..e92175b6b5a35eb76403683551a8824d1166bd0a 100644 (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
 --------