eBay / Jungle

An embedded key-value store library specialized for building state machine and log store
Apache License 2.0
224 stars 54 forks source link

CMake change for use as submodule #167

Closed awitten1 closed 7 months ago

awitten1 commented 7 months ago

Hi! Thank you for building this! It's cool!

I wanted to use Jungle as a submodule in my project but in order to get it to work I had to make some minor changes to the main CMakeLists.txt file.

The problem is that when used as a submodule, CMAKE_SOURCE_DIR is no longer correct in Jungle cmake files.

This change allows me to use Jungle as a submodule like so:

cmake_minimum_required(VERSION 3.24)

project(storage_engines CXX)
execute_process(
  COMMAND ./prepare.sh -j8
  WORKING_DIRECTORY Jungle
)
add_subdirectory(Jungle)
add_executable(main main.cpp)
target_link_libraries(main static_lib)

Which I think is a nice way to use Jungle as a dependency.

greensky00 commented 7 months ago

Likely related to this issue https://github.com/actions/runner-images/issues/9524