Skip to content

Commit 2ed4157

Browse files
ottokvuvova
authored andcommitted
Fix RocksDB detection of ZSTD
The library finder needs to have capitals in its name so that FIND_PACKAGE will load the correct finder and actually detect that libzstd is available. Without this change the CMake would just always silently skip ZSTD since it would never find it. Simplify Debian autopkgtest RocksDB part and make it more verbose so that future regressions like this are easier to debug. Also remove QUIET from the RocksDB FIND_PACKAGE call so that it is easier to read in build logs what libraries were detected. Also add missing underscores to error messages.
1 parent c032c2e commit 2ed4157

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed
File renamed without changes.

storage/rocksdb/build_rocksdb.cmake

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -36,15 +36,15 @@ endif()
3636
# Optional compression libraries.
3737

3838
foreach(compression_lib LZ4 BZip2 ZSTD snappy)
39-
FIND_PACKAGE(${compression_lib} QUIET)
39+
FIND_PACKAGE(${compression_lib})
4040

4141
SET(WITH_ROCKSDB_${compression_lib} AUTO CACHE STRING
4242
"Build RocksDB with ${compression_lib} compression. Possible values are 'ON', 'OFF', 'AUTO' and default is 'AUTO'")
4343

4444
if(${WITH_ROCKSDB_${compression_lib}} STREQUAL "ON" AND NOT ${${compression_lib}_FOUND})
4545
MESSAGE(FATAL_ERROR
46-
"${compression_lib} library was not found, but WITH_ROCKSDB${compression_lib} option is ON.\
47-
Either set WITH_ROCKSDB${compression_lib} to OFF, or make sure ${compression_lib} is installed")
46+
"${compression_lib} library was not found, but WITH_ROCKSDB_${compression_lib} option is ON.\
47+
Either set WITH_ROCKSDB_${compression_lib} to OFF, or make sure ${compression_lib} is installed")
4848
endif()
4949
endforeach()
5050

0 commit comments

Comments
 (0)