Skip to content

Commit

Permalink
src/CMakeLists.txt: FreeBSD/Clang fixes to compile RocksDB
Browse files Browse the repository at this point in the history
 - make sure the right compiler is used
 - with the correct flags

Signed-off-by: Willem Jan Withagen <wjw@digiware.nl>
  • Loading branch information
wjwithagen committed Jul 24, 2016
1 parent af1598a commit 4a82607
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion src/CMakeLists.txt
Expand Up @@ -637,9 +637,14 @@ install(TARGETS ceph-mon DESTINATION bin)
if(NOT ALLOCATOR STREQUAL "jemalloc")
set(disable_jemalloc "DISABLE_JEMALLOC=1")
endif()
set(EXTRA_CXXFLAGS -fPIC -Wno-unused-variable -DNDEBUG)
if(FREEBSD)
set(EXTRA_CXXFLAGS ${EXTRA_CXXFLAGS} -Irocksdb/include -I/usr/local/include)
set(MAKEFLAGS ${MAKEFLAGS})
endif(FREEBSD)
add_custom_target(build_rocksdb
COMMAND
PORTABLE=1 ${disable_jemalloc} $(MAKE) static_lib EXTRA_CXXFLAGS='-fPIC -Wno-unused-variable'
PORTABLE=1 ${disable_jemalloc} $(MAKE) ${MAKEFLAGS} static_lib CXX="${CMAKE_CXX_COMPILER}" EXTRA_CXXFLAGS="${EXTRA_CXXFLAGS}"
WORKING_DIRECTORY ${CMAKE_SOURCE_DIR}/src/rocksdb
COMMENT "rocksdb building")

Expand Down

0 comments on commit 4a82607

Please sign in to comment.