summaryrefslogtreecommitdiffstats
path: root/CMakeLists.txt
diff options
context:
space:
mode:
authorBrad King <brad.king@kitware.com>2022-02-22 22:51:18 (GMT)
committerBrad King <brad.king@kitware.com>2022-02-22 22:51:18 (GMT)
commit14eb8a6ab98618fcf8550e1da2a8ff07b1aa26dc (patch)
treec7db344a888364077a84abced814810f3d42114c /CMakeLists.txt
parentd6b811fb8253ffa00bc36cba8b70b2b2f59eaf7c (diff)
downloadCMake-14eb8a6ab98618fcf8550e1da2a8ff07b1aa26dc.zip
CMake-14eb8a6ab98618fcf8550e1da2a8ff07b1aa26dc.tar.gz
CMake-14eb8a6ab98618fcf8550e1da2a8ff07b1aa26dc.tar.bz2
libarchive: Simplify hard-coded options for build within CMake
Take advantage of policy CMP0077 NEW behavior to hard-code settings, defined by `option()` calls in upstream libarchive, without adding them to our cache.
Diffstat (limited to 'CMakeLists.txt')
-rw-r--r--CMakeLists.txt59
1 files changed, 29 insertions, 30 deletions
diff --git a/CMakeLists.txt b/CMakeLists.txt
index 547c32d..9de5338 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -606,38 +606,37 @@ macro (CMAKE_BUILD_UTILITIES)
set(ZLIB_INCLUDE_DIR ${CMAKE_ZLIB_INCLUDES})
set(ZLIB_LIBRARY ${CMAKE_ZLIB_LIBRARIES})
add_definitions(-DLIBARCHIVE_STATIC)
- # FIXME: Once CMake 3.13+ is required, drop CACHE and use CMP0077.
- set(ENABLE_MBEDTLS OFF CACHE INTERNAL "libarchive: No mbed TLS")
- set(ENABLE_NETTLE OFF CACHE INTERNAL "libarchive: No Nettle")
+ set(ENABLE_MBEDTLS OFF)
+ set(ENABLE_NETTLE OFF)
if(DEFINED CMAKE_USE_OPENSSL)
- set(ENABLE_OPENSSL ${CMAKE_USE_OPENSSL} CACHE INTERNAL "libarchive: Use OpenSSL?")
+ set(ENABLE_OPENSSL "${CMAKE_USE_OPENSSL}")
else()
- set(ENABLE_OPENSSL OFF CACHE INTERNAL "libarchive: Use OpenSSL?")
- endif()
- set(ENABLE_LIBB2 OFF CACHE INTERNAL "libarchive: No LIBB2")
- set(ENABLE_LZ4 OFF CACHE INTERNAL "libarchive: No LZ4")
- set(ENABLE_LZO OFF CACHE INTERNAL "libarchive: No LZO")
- set(ENABLE_LZMA ON CACHE INTERNAL "libarchive: Use LZMA")
- set(ENABLE_ZSTD ON CACHE INTERNAL "libarchive: Use ZSTD")
- set(ENABLE_ZLIB ON CACHE INTERNAL "libarchive: Use ZLIB")
- set(ENABLE_BZip2 ON CACHE INTERNAL "libarchive: Use BZip2")
- set(ENABLE_LIBXML2 OFF CACHE INTERNAL "libarchive: No LibXML2")
- set(ENABLE_EXPAT OFF CACHE INTERNAL "libarchive: No Expat")
- set(ENABLE_PCREPOSIX OFF CACHE INTERNAL "libarchive: No PCREPOSIX")
- set(ENABLE_LibGCC OFF CACHE INTERNAL "libarchive: No LibGCC")
- set(ENABLE_CNG OFF CACHE INTERNAL "libarchive: No CNG")
- set(ENABLE_TAR OFF CACHE INTERNAL "libarchive: No tar command-line tool")
- set(ENABLE_TAR_SHARED OFF CACHE INTERNAL "libarchive: No tar command-line tool")
- set(ENABLE_CPIO OFF CACHE INTERNAL "libarchive: No cpio command-line tool")
- set(ENABLE_CPIO_SHARED OFF CACHE INTERNAL "libarchive: No cpio command-line tool")
- set(ENABLE_CAT OFF CACHE INTERNAL "libarchive: No cat command-line tool")
- set(ENABLE_CAT_SHARED OFF CACHE INTERNAL "libarchive: No cat command-line tool")
- set(ENABLE_XATTR OFF CACHE INTERNAL "libarchive: No extended attribute support")
- set(ENABLE_ACL OFF CACHE INTERNAL "libarchive: No ACL support")
- set(ENABLE_ICONV OFF CACHE INTERNAL "libarchive: No iconv support")
- set(ENABLE_TEST OFF CACHE INTERNAL "libarchive: No tests")
- set(ENABLE_COVERAGE OFF CACHE INTERNAL "libarchive: No coverage")
- set(ENABLE_INSTALL OFF CACHE INTERNAL "libarchive: No installation")
+ set(ENABLE_OPENSSL OFF)
+ endif()
+ set(ENABLE_LIBB2 OFF)
+ set(ENABLE_LZ4 OFF)
+ set(ENABLE_LZO OFF)
+ set(ENABLE_LZMA ON)
+ set(ENABLE_ZSTD ON)
+ set(ENABLE_ZLIB ON)
+ set(ENABLE_BZip2 ON)
+ set(ENABLE_LIBXML2 OFF)
+ set(ENABLE_EXPAT OFF)
+ set(ENABLE_PCREPOSIX OFF)
+ set(ENABLE_LibGCC OFF)
+ set(ENABLE_CNG OFF)
+ set(ENABLE_TAR OFF)
+ set(ENABLE_TAR_SHARED OFF)
+ set(ENABLE_CPIO OFF)
+ set(ENABLE_CPIO_SHARED OFF)
+ set(ENABLE_CAT OFF)
+ set(ENABLE_CAT_SHARED OFF)
+ set(ENABLE_XATTR OFF)
+ set(ENABLE_ACL OFF)
+ set(ENABLE_ICONV OFF)
+ set(ENABLE_TEST OFF)
+ set(ENABLE_COVERAGE OFF)
+ set(ENABLE_INSTALL OFF)
set(POSIX_REGEX_LIB "" CACHE INTERNAL "libarchive: No POSIX regular expression support")
set(ENABLE_SAFESEH "" CACHE INTERNAL "libarchive: No /SAFESEH linker flag")
set(WINDOWS_VERSION "WIN7" CACHE INTERNAL "libarchive: Set Windows version to use (Windows only)")