Skip to content

Commit

Permalink
[cmake][git] Remove rocksdb dependencies
Browse files Browse the repository at this point in the history
  • Loading branch information
NikitaZotov committed Apr 15, 2023
1 parent 5dd8635 commit 9bfb954
Show file tree
Hide file tree
Showing 16 changed files with 7 additions and 122 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/coverage.yml
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ jobs:

- name: Install dependencies
id: install_deps
run: scripts/install_deps_ubuntu.sh --dev --rocksdb
run: scripts/install_deps_ubuntu.sh --dev

- name: Restore build caches
uses: hendrikmuhs/ccache-action@v1.2
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ jobs:
- name: Install dependencies (Ubuntu)
if: startswith(matrix.os, 'ubuntu')
run: scripts/install_deps_ubuntu.sh --dev --rocksdb
run: scripts/install_deps_ubuntu.sh --dev

- name: Restore build caches
uses: hendrikmuhs/ccache-action@v1.2
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/sanitizers.yml
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ jobs:

- name: Install dependencies
id: install_deps
run: scripts/install_deps_ubuntu.sh --dev --rocksdb
run: scripts/install_deps_ubuntu.sh --dev

- name: Restore build caches
uses: hendrikmuhs/ccache-action@v1.2
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/style.yml
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ jobs:

- name: Install dependencies
id: install_deps
run: ./scripts/install_deps_ubuntu.sh --dev --rocksdb
run: ./scripts/install_deps_ubuntu.sh --dev

- name: Checking the code with clang
run: |
Expand Down
24 changes: 0 additions & 24 deletions cmake/FindRocksDB.cmake

This file was deleted.

13 changes: 0 additions & 13 deletions dependencies.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -27,10 +27,6 @@ macro(sc_linux_target_dependencies)
find_package(Boost 1.71 REQUIRED COMPONENTS filesystem system program_options)
find_package(websocketpp REQUIRED 0.8.3)

if(${SC_FILE_MEMORY} MATCHES "Rocksdb")
find_package(RocksDB REQUIRED)
endif()

find_package(PkgConfig REQUIRED)
pkg_search_module(GLIB2 REQUIRED glib-2.0)
pkg_search_module(GLIB2_MODULE REQUIRED gmodule-2.0)
Expand Down Expand Up @@ -70,9 +66,6 @@ macro(sc_win_target_dependencies _PACKAGES_CONFIG _THIRDPARTY_PATH _BIN_PATH)

set(GLIB_PATH "${PACKAGES_PATH}/glib.2.36.2.11/build/native")
set(BOOST_PATH "${PACKAGES_PATH}/boost.${BOOST_VERSION}/lib/native")
if (${SC_FILE_MEMORY} MATCHES "Rocksdb")
set(ROCKSDB_PATH "${SC_MACHINE_THIRDPARTY_PATH}/rocksdb")
endif()

set(LIBCLANG_INCLUDE_DIRS "${_THIRDPARTY_PATH}/clang/include")
set(LIBCLANG_LIBRARY "libclang")
Expand All @@ -84,11 +77,6 @@ macro(sc_win_target_dependencies _PACKAGES_CONFIG _THIRDPARTY_PATH _BIN_PATH)
set(LIBCURL_INCLUDE_DIRS "${LIBCURL_PATH}/include")
set(LIBCURL_LIBRARIES "${LIBCURL_PATH}/lib/libcurl.lib" "WSock32.lib" "Ws2_32.lib")

if(${SC_FILE_MEMORY} MATCHES "Rocksdb")
set(RocksDB_INCLUDE_DIR "${ROCKSDB_PATH}/include")
set(RocksDB_LIBRARIES "${ROCKSDB_PATH}/rocksdb-shared.lib")
endif()

include_directories("${BOOST_PATH}/include" "${LIBCURL_INCLUDE_DIRS}")

link_directories(
Expand Down Expand Up @@ -121,7 +109,6 @@ macro(sc_win_target_dependencies _PACKAGES_CONFIG _THIRDPARTY_PATH _BIN_PATH)
"${LIBCURL_RUNTIME_PATH}/libcurl.dll"
"${LIBCURL_RUNTIME_PATH}/libeay32.dll"
"${LIBCURL_RUNTIME_PATH}/ssleay32.dll"
"${ROCKSDB_PATH}/rocksdb-shared.dll"
)
file(COPY ${WIN_RUNTIME_LIBRARIES} DESTINATION "${_BIN_PATH}")
endmacro()
3 changes: 0 additions & 3 deletions docs/build/cmake-flags.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,9 +8,6 @@ cmake -B build -DSC_BUILD_TESTS=ON -DSC_AUTO_TEST=ON
cmake --build build -j$(nproc)
```

To build with `Sc-dictionary` or `Rocksdb` file system storage change variable `SC_FILE_MEMORY` in CMakeLists.txt by
`Dictionary` or `Rocksdb` alternatively.

Additionally you can use `-DSC_BUILD_BENCH=ON` flag to build performance tests


Expand Down
1 change: 1 addition & 0 deletions docs/changelog.md
Original file line number Diff line number Diff line change
Expand Up @@ -169,6 +169,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0

### Removed

- Remove rocksdb
- Remove find by substring logic from sc-dictionary
- Remove legacy gwf-translator for 0.3.0 gwf sources from sc-builder
- Remove legacy glib-based tests
Expand Down
1 change: 0 additions & 1 deletion docs/thirdparty.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@ Based on refactored code from: [CPP-Reflection](https://github.com/AustinBrunkho

## Sc-memory
* [JSON for Modern C++](https://github.com/nlohmann/json)
* [RocksDB](https://rocksdb.org/)
* [Antlr 4](https://github.com/antlr/antlr4)
* [libclang](https://clang.llvm.org/docs/Tooling.html)
* [Websocketcpp](https://docs.websocketpp.org/)
5 changes: 0 additions & 5 deletions sc-memory/sc-core/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -7,11 +7,6 @@ add_library(sc-core SHARED ${SOURCES})
target_include_directories(sc-core PRIVATE ${GLIB2_INCLUDE_DIRS})
target_link_libraries(sc-core ${GLIB2_LIBRARIES})

if(${SC_FILE_MEMORY} MATCHES "Rocksdb")
target_include_directories(sc-core PRIVATE ${RocksDB_INCLUDE_DIR})
target_link_libraries(sc-core ${RocksDB_LIBRARIES})
endif()

if(${SC_COVERAGE})
if (CMAKE_CXX_COMPILER_ID MATCHES "GNU")
target_link_libraries(sc-core gcov)
Expand Down
26 changes: 0 additions & 26 deletions sc-memory/sc-core/sc-store/sc_link_helpers.c

This file was deleted.

22 changes: 0 additions & 22 deletions sc-memory/sc-core/sc-store/sc_link_helpers.h

This file was deleted.

1 change: 0 additions & 1 deletion sc-memory/sc-core/sc-store/sc_storage.c
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,6 @@
#include "sc_defines.h"
#include "sc_segment.h"
#include "sc_element.h"
#include "sc_link_helpers.h"
#include "sc_event.h"
#include "sc_stream_memory.h"

Expand Down
13 changes: 0 additions & 13 deletions sc-memory/sc-core/sc-store/sc_types.h
Original file line number Diff line number Diff line change
Expand Up @@ -227,19 +227,6 @@ struct _sc_stat
sc_uint32 segments_count;
};

# ifdef SC_ROCKSDB_FS_STORAGE
// contents
# define SC_MAX_CHECKSUM_LEN 32
//! Structure to store checksum information
struct _sc_check_sum
{
char data[SC_MAX_CHECKSUM_LEN]; // maximum checksum length
sc_uint8 len; // checksum length
};
# endif

typedef struct _sc_check_sum sc_check_sum;
typedef struct _sc_content sc_content;
#endif

typedef struct _sc_arc sc_arc;
Expand Down
2 changes: 1 addition & 1 deletion scripts/install_deps_macOS.sh
Original file line number Diff line number Diff line change
@@ -1 +1 @@
brew install boost glib llvm@14 antlr antlr4-cpp-runtime temurin pkgconfig rocksdb cmake boost-python3 ccache websocketpp nlohmann-json
brew install boost glib llvm@14 antlr antlr4-cpp-runtime temurin pkgconfig cmake boost-python3 ccache websocketpp nlohmann-json
10 changes: 1 addition & 9 deletions scripts/install_deps_ubuntu.sh
Original file line number Diff line number Diff line change
Expand Up @@ -6,10 +6,9 @@ APP_ROOT_PATH=$(cd "$( dirname "${BASH_SOURCE[0]}" )" >/dev/null 2>&1 && cd .. &
function usage() {
cat <<USAGE
Usage: $0 [--rocksdb] [--dev]
Usage: $0 [--dev]
Options:
--rocksdb: installs deps required for RocksDB storage backend
--dev: installs dependencies required to compile sc-machine
USAGE
exit 1
Expand Down Expand Up @@ -49,10 +48,6 @@ packagelist_dev=(
python3-dev
)

packagelist_rocksdb=(
librocksdb-dev
)

packages=()
packages+=(${packagelist_runtime[@]})

Expand All @@ -61,9 +56,6 @@ while [ "$1" != "" ]; do
--dev)
packages+=(${packagelist_dev[@]})
;;
--rocksdb)
packages+=(${packagelist_rocksdb[@]})
;;
-h | --help)
usage # show help
;;
Expand Down

0 comments on commit 9bfb954

Please sign in to comment.