Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 6 additions & 0 deletions .gitmodules
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
[submodule "deps/datcxx/cxx-tap"]
path = deps/heapwolf/cxx-tap
url = https://github.com/xloem/tap.git
[submodule "deps/datcxx/flat-tree"]
path = deps/datcxx/flat-tree
url = https://github.com/xloem/flat-tree.git
21 changes: 21 additions & 0 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
cmake_minimum_required(VERSION 3.10)

project(hypercore)

execute_process(COMMAND git submodule update --init --recursive WORKING_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR})

add_subdirectory(deps/datcxx/flat-tree)
add_subdirectory(deps/heapwolf/cxx-tap)

add_library(${PROJECT_NAME} index.cxx)
target_link_libraries(${PROJECT_NAME} timers eventemitter tap)

target_include_directories(${PROJECT_NAME} INTERFACE ${CMAKE_CURRENT_SOURCE_DIR}/..)
install(FILES index.hxx DESTINATION include/${PROJECT_NAME})

include(CTest)
if(BUILD_TESTING)
add_executable(${PROJECT_NAME}-test test/index.cxx)
target_link_libraries(${PROJECT_NAME}-test ${PROJECT_NAME})
add_test(NAME ${PROJECT_NAME} COMMAND ${PROJECT_NAME}-test)
endif()
1 change: 1 addition & 0 deletions deps/datcxx/flat-tree
Submodule flat-tree added at 9c39fb
1 change: 1 addition & 0 deletions deps/heapwolf/cxx-tap
Submodule cxx-tap added at dcf991
12 changes: 7 additions & 5 deletions index.cxx
Original file line number Diff line number Diff line change
@@ -1,8 +1,10 @@
#include "index.hxx"
#include "deps/datcxx/flat-tree/index.hxx"

namespace Hypercore {
size_t getIndex () {
return flatTree::index(0, 0);
}
} // namespace Hypercore
namespace Hyper {
namespace Core {
size_t getIndex () {
return FlatTree::index(0, 0);
}
} // namespace Core
} // namespace Hyper