diff options
author | Lasse Collin <lasse.collin@tukaani.org> | 2023-09-12 23:43:49 +0300 |
---|---|---|
committer | Lasse Collin <lasse.collin@tukaani.org> | 2023-09-22 20:06:27 +0300 |
commit | daea64d158a7151ca6c255a0e4554c6d521cd589 (patch) | |
tree | d9bef3b268b1508bfb261edf5d421c29ccf18995 | |
parent | MSVC: #define inline and restrict only when needed. (diff) | |
download | xz-daea64d158a7151ca6c255a0e4554c6d521cd589.tar.xz |
CMake: Allow building xz with Visual Studio 2015 and later.
Building the command line tools xz and xzdec with the combination
of CMake + Visual Studio 2015/2017/2019/2022 works now.
VS2013 update 2 should still be able to build liblzma.
VS2013 cannot build the xz command line tool because xz
needs snprintf() that roughly conforms to C99.
VS2013 is old and no extra code will be added to support it.
Thanks to Kelvin Lee and Jia Tan for testing.
-rw-r--r-- | CMakeLists.txt | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/CMakeLists.txt b/CMakeLists.txt index c265cac4..d2fe35df 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -1081,7 +1081,7 @@ endif() # xz ############################################################################# -if(NOT MSVC) +if(NOT MSVC OR MSVC_VERSION GREATER_EQUAL 1900) add_executable(xz src/common/mythread.h src/common/sysdefs.h |