Skip to content

Commit 2a1058d

Browse files
build(deps): Add task-based installations for LZ4 and Zstandard dependencies; Use latest versions for source-based installations. (#1156)
Co-authored-by: kirkrodrigues <[email protected]>
1 parent 5e6c989 commit 2a1058d

File tree

15 files changed

+62
-227
lines changed

15 files changed

+62
-227
lines changed

components/core/CMakeLists.txt

Lines changed: 6 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -297,16 +297,14 @@ if(CLP_NEED_YSTDLIB)
297297
add_subdirectory("${CLP_YSTDLIB_SOURCE_DIRECTORY}" "${CMAKE_BINARY_DIR}/ystdlib" EXCLUDE_FROM_ALL)
298298
endif()
299299

300-
# Find and setup ZStd Library
301300
if(CLP_NEED_ZSTD)
301+
# v1.4.8 is the lowest version available in the package managers of the OSes we support.
302+
find_package(zstd 1.4.8 REQUIRED)
303+
message(STATUS "Found zstd ${zstd_VERSION}")
302304
if(CLP_USE_STATIC_LIBS)
303-
set(ZStd_USE_STATIC_LIBS ON)
304-
endif()
305-
find_package(ZStd 1.4.4 REQUIRED)
306-
if(ZStd_FOUND)
307-
message(STATUS "Found ZStd ${ZStd_VERSION}")
305+
set(zstd_TARGET zstd::libzstd_static)
308306
else()
309-
message(FATAL_ERROR "Could not find ${CLP_LIBS_STRING} libraries for ZStd")
307+
set(zstd_TARGET zstd::libzstd_shared)
310308
endif()
311309
endif()
312310

@@ -772,7 +770,7 @@ if(CLP_BUILD_TESTING)
772770
ystdlib::containers
773771
ystdlib::error_handling
774772
${LIBLZMA_LIBRARIES}
775-
ZStd::ZStd
773+
${zstd_TARGET}
776774
)
777775
target_compile_features(unitTest
778776
PRIVATE cxx_std_20

components/core/cmake/Modules/FindLZ4.cmake

Lines changed: 0 additions & 103 deletions
This file was deleted.

components/core/cmake/Modules/FindZStd.cmake

Lines changed: 0 additions & 106 deletions
This file was deleted.

components/core/src/clp/clg/CMakeLists.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -150,7 +150,7 @@ if(CLP_BUILD_EXECUTABLES)
150150
yaml-cpp
151151
ystdlib::containers
152152
ystdlib::error_handling
153-
ZStd::ZStd
153+
${zstd_TARGET}
154154
)
155155
# Put the built executable at the root of the build directory
156156
set_target_properties(

components/core/src/clp/clo/CMakeLists.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -178,7 +178,7 @@ if(CLP_BUILD_EXECUTABLES)
178178
clp::string_utils
179179
ystdlib::containers
180180
ystdlib::error_handling
181-
ZStd::ZStd
181+
${zstd_TARGET}
182182
)
183183
# Put the built executable at the root of the build directory
184184
set_target_properties(

components/core/src/clp/clp/CMakeLists.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -189,7 +189,7 @@ if(CLP_BUILD_EXECUTABLES)
189189
yaml-cpp
190190
ystdlib::containers
191191
ystdlib::error_handling
192-
ZStd::ZStd
192+
${zstd_TARGET}
193193
)
194194
# Put the built executable at the root of the build directory
195195
set_target_properties(

components/core/src/clp/make_dictionaries_readable/CMakeLists.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,7 @@ if(CLP_BUILD_EXECUTABLES)
4949
spdlog::spdlog
5050
clp::string_utils
5151
ystdlib::containers
52-
ZStd::ZStd
52+
${zstd_TARGET}
5353
)
5454
# Put the built executable at the root of the build directory
5555
set_target_properties(

components/core/src/clp_s/CMakeLists.txt

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -124,7 +124,7 @@ if(CLP_BUILD_CLP_S_CLP_DEPENDENCIES)
124124
OpenSSL::Crypto
125125
spdlog::spdlog
126126
ystdlib::error_handling
127-
ZStd::ZStd
127+
${zstd_TARGET}
128128
)
129129
endif()
130130

@@ -204,7 +204,7 @@ if(CLP_BUILD_CLP_S_IO)
204204
clp_s::clp_dependencies
205205
fmt::fmt
206206
spdlog::spdlog
207-
ZStd::ZStd
207+
${zstd_TARGET}
208208
)
209209
endif()
210210

components/core/src/clp_s/indexer/CMakeLists.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -124,7 +124,7 @@ if(CLP_BUILD_EXECUTABLES)
124124
spdlog::spdlog
125125
yaml-cpp
126126
ystdlib::containers
127-
ZStd::ZStd
127+
${zstd_TARGET}
128128
)
129129
# Put the built executable at the root of the build directory
130130
set_target_properties(

components/core/src/glt/glt/CMakeLists.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -192,7 +192,7 @@ if(CLP_BUILD_EXECUTABLES)
192192
clp::string_utils
193193
yaml-cpp
194194
ystdlib::error_handling
195-
ZStd::ZStd
195+
${zstd_TARGET}
196196
)
197197
# Put the built executable at the root of the build directory
198198
set_target_properties(

0 commit comments

Comments
 (0)