Commit 2ed41576 authored by Otto Kekäläinen's avatar Otto Kekäläinen Committed by Sergei Golubchik

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.
parent c032c2ef
......@@ -36,15 +36,15 @@ endif()
# Optional compression libraries.
foreach(compression_lib LZ4 BZip2 ZSTD snappy)
FIND_PACKAGE(${compression_lib} QUIET)
FIND_PACKAGE(${compression_lib})
SET(WITH_ROCKSDB_${compression_lib} AUTO CACHE STRING
"Build RocksDB with ${compression_lib} compression. Possible values are 'ON', 'OFF', 'AUTO' and default is 'AUTO'")
if(${WITH_ROCKSDB_${compression_lib}} STREQUAL "ON" AND NOT ${${compression_lib}_FOUND})
MESSAGE(FATAL_ERROR
"${compression_lib} library was not found, but WITH_ROCKSDB${compression_lib} option is ON.\
Either set WITH_ROCKSDB${compression_lib} to OFF, or make sure ${compression_lib} is installed")
"${compression_lib} library was not found, but WITH_ROCKSDB_${compression_lib} option is ON.\
Either set WITH_ROCKSDB_${compression_lib} to OFF, or make sure ${compression_lib} is installed")
endif()
endforeach()
......
Markdown is supported
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