Commit 4bd3f375 authored by Cole Kissane's avatar Cole Kissane Committed by Tobias Hieta
Browse files

use LLVM_USE_STATIC_ZSTD

removes LLVM_PREFER_STATIC_ZSTD in favor of using a LLVM_USE_STATIC_ZSTD

Reviewed By: phosek

Differential Revision: https://reviews.llvm.org/D133222

(cherry picked from commit fc1da043)
parent 55d4d86e
......@@ -446,7 +446,7 @@ set(LLVM_ENABLE_ZLIB "ON" CACHE STRING "Use zlib for compression/decompression i
set(LLVM_ENABLE_ZSTD "ON" CACHE STRING "Use zstd for compression/decompression if available. Can be ON, OFF, or FORCE_ON")
set(LLVM_PREFER_STATIC_ZSTD TRUE CACHE BOOL "Use static version of zstd if available. Can be TRUE, FALSE")
set(LLVM_USE_STATIC_ZSTD FALSE CACHE BOOL "Use static version of zstd. Can be TRUE, FALSE")
set(LLVM_ENABLE_CURL "OFF" CACHE STRING "Use libcurl for the HTTP client if available. Can be ON, OFF, or FORCE_ON")
......
......@@ -25,21 +25,11 @@ if(LLVM_ENABLE_ZLIB)
list(APPEND imported_libs ZLIB::ZLIB)
endif()
set(zstd_target none)
if(LLVM_ENABLE_ZSTD)
if(LLVM_PREFER_STATIC_ZSTD)
if(TARGET zstd::libzstd_static)
set(zstd_target zstd::libzstd_static)
else()
set(zstd_target zstd::libzstd_shared)
endif()
if(TARGET zstd::libzstd_shared AND NOT LLVM_USE_STATIC_ZSTD)
set(zstd_target zstd::libzstd_shared)
else()
if(TARGET zstd::libzstd_shared)
set(zstd_target zstd::libzstd_shared)
else()
set(zstd_target zstd::libzstd_static)
endif()
set(zstd_target zstd::libzstd_static)
endif()
endif()
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment