Skip to content

Commit

Permalink
Merge pull request ceph#22439 from shaba/devel/fix-rocksdb
Browse files Browse the repository at this point in the history
cmake: fix find system rockdb

Reviewed-by: Kefu Chai <[email protected]>
  • Loading branch information
tchaikov authored Jun 8, 2018
2 parents e61c186 + 2ac26bd commit 89ed085
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions cmake/modules/Findrocksdb.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -15,11 +15,11 @@ find_library(ROCKSDB_LIBRARIES rocksdb)

if(ROCKSDB_INCLUDE_DIR AND EXISTS "${ROCKSDB_INCLUDE_DIR}/rocksdb/version.h")
foreach(ver "MAJOR" "MINOR" "PATCH")
file(STRINGS "${ROCKSDB_INCLUDE_DIR}/version.h" ROCKSDB_VER_${ver}_LINE
file(STRINGS "${ROCKSDB_INCLUDE_DIR}/rocksdb/version.h" ROCKSDB_VER_${ver}_LINE
REGEX "^#define[ \t]+ROCKSDB_${ver}[ \t]+[0-9]+$")
string(REGEX REPLACE "^#define[ \t]+ROCKSDB_${ver}[ \t]+([0-9]+)$"
"\\1" ROCKSDB_VERSION_${ver} "${ROCKDB_VER_${ver}_LINE}")
unset(${ROCKDB_VER_${ver}_LINE})
"\\1" ROCKSDB_VERSION_${ver} "${ROCKSDB_VER_${ver}_LINE}")
unset(${ROCKSDB_VER_${ver}_LINE})
endforeach()
set(ROCKSDB_VERSION_STRING
"${ROCKSDB_VERSION_MAJOR}.${ROCKSDB_VERSION_MINOR}.${ROCKSDB_VERSION_PATCH}")
Expand Down

0 comments on commit 89ed085

Please sign in to comment.