summaryrefslogtreecommitdiffstats
path: root/src/zstd/build/cmake/contrib/pzstd
diff options
context:
space:
mode:
authorDaniel Baumann <daniel.baumann@progress-linux.org>2024-04-07 18:45:59 +0000
committerDaniel Baumann <daniel.baumann@progress-linux.org>2024-04-07 18:45:59 +0000
commit19fcec84d8d7d21e796c7624e521b60d28ee21ed (patch)
tree42d26aa27d1e3f7c0b8bd3fd14e7d7082f5008dc /src/zstd/build/cmake/contrib/pzstd
parentInitial commit. (diff)
downloadceph-19fcec84d8d7d21e796c7624e521b60d28ee21ed.tar.xz
ceph-19fcec84d8d7d21e796c7624e521b60d28ee21ed.zip
Adding upstream version 16.2.11+ds.upstream/16.2.11+dsupstream
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'src/zstd/build/cmake/contrib/pzstd')
-rw-r--r--src/zstd/build/cmake/contrib/pzstd/CMakeLists.txt32
1 files changed, 32 insertions, 0 deletions
diff --git a/src/zstd/build/cmake/contrib/pzstd/CMakeLists.txt b/src/zstd/build/cmake/contrib/pzstd/CMakeLists.txt
new file mode 100644
index 000000000..5c30a91b1
--- /dev/null
+++ b/src/zstd/build/cmake/contrib/pzstd/CMakeLists.txt
@@ -0,0 +1,32 @@
+# ################################################################
+# Copyright (c) 2016-present, Facebook, Inc.
+# All rights reserved.
+#
+# This source code is licensed under both the BSD-style license (found in the
+# LICENSE file in the root directory of this source tree) and the GPLv2 (found
+# in the COPYING file in the root directory of this source tree).
+# ################################################################
+
+project(pzstd)
+
+set(CMAKE_INCLUDE_CURRENT_DIR TRUE)
+
+# Define programs directory, where sources and header files are located
+set(LIBRARY_DIR ${ZSTD_SOURCE_DIR}/lib)
+set(PROGRAMS_DIR ${ZSTD_SOURCE_DIR}/programs)
+set(PZSTD_DIR ${ZSTD_SOURCE_DIR}/contrib/pzstd)
+include_directories(${PROGRAMS_DIR} ${LIBRARY_DIR} ${LIBRARY_DIR}/common ${PZSTD_DIR})
+
+add_executable(pzstd ${PROGRAMS_DIR}/util.c ${PZSTD_DIR}/main.cpp ${PZSTD_DIR}/Options.cpp ${PZSTD_DIR}/Pzstd.cpp ${PZSTD_DIR}/SkippableFrame.cpp)
+set_property(TARGET pzstd APPEND PROPERTY COMPILE_DEFINITIONS "NDEBUG")
+set_property(TARGET pzstd APPEND PROPERTY COMPILE_OPTIONS "-Wno-shadow")
+
+set(THREADS_PREFER_PTHREAD_FLAG ON)
+find_package(Threads REQUIRED)
+if (CMAKE_USE_PTHREADS_INIT)
+ target_link_libraries(pzstd libzstd_shared ${CMAKE_THREAD_LIBS_INIT})
+else()
+ message(SEND_ERROR "ZSTD currently does not support thread libraries other than pthreads")
+endif()
+
+install(TARGETS pzstd RUNTIME DESTINATION "bin")