Skip to content
Permalink
Browse files

Pass the ARCH flag to RocksDB in *nix environments

  • Loading branch information...
brandonlehmann committed May 14, 2019
1 parent 9200d25 commit 34ce0d372cd4846ba11cf3996806ab8080e7d938
Showing with 4 additions and 1 deletion.
  1. +1 −1 CMakeLists.txt
  2. +3 −0 external/rocksdb/CMakeLists.txt
@@ -288,7 +288,7 @@ add_subdirectory(src)
## We need to setup the RocksDB build environment to match our system
if(NOT MSVC)
execute_process(
COMMAND cmake ${CMAKE_CURRENT_SOURCE_DIR}/external/rocksdb -DWITH_LZ4=ON -DWITH_GFLAGS=0 -DCMAKE_BUILD_TYPE=MinSizeRel -DWITH_TESTS=OFF -DWITH_TOOLS=OFF -DPORTABLE=ON -B${PROJECT_BINARY_DIR}/rocksdb
COMMAND cmake ${CMAKE_CURRENT_SOURCE_DIR}/external/rocksdb -DARCH=${ARCH} -DWITH_LZ4=ON -DWITH_GFLAGS=0 -DCMAKE_BUILD_TYPE=MinSizeRel -DWITH_TESTS=OFF -DWITH_TOOLS=OFF -DPORTABLE=ON -B${PROJECT_BINARY_DIR}/rocksdb
)
set_directory_properties(PROPERTIES ADDITIONAL_MAKE_CLEAN_FILES "${PROJECT_BINARY_DIR}/rocksdb/librocksdb.a")
endif()
@@ -34,6 +34,8 @@

cmake_minimum_required(VERSION 2.8.12)

message(STATUS "Setting up build environment for RocksDB")

find_program(CCACHE_PROGRAM ccache)
if(CCACHE_PROGRAM)
message(STATUS "Found ccache package... Activating...")
@@ -51,6 +53,7 @@ endif()

list(APPEND CMAKE_MODULE_PATH "${CMAKE_CURRENT_LIST_DIR}/cmake/modules/")

set(ARCH native CACHE STRING "CPU to build for: -march value or native")
option(WITH_JEMALLOC "build with JeMalloc" OFF)
option(WITH_SNAPPY "build with SNAPPY" OFF)
option(WITH_LZ4 "build with lz4" OFF)

0 comments on commit 34ce0d3

Please sign in to comment.
You can’t perform that action at this time.