Skip to content

Commit

Permalink
init
Browse files Browse the repository at this point in the history
  • Loading branch information
jokerwyt committed Jan 8, 2023
0 parents commit 0a95ca8
Show file tree
Hide file tree
Showing 11 changed files with 1,196 additions and 0 deletions.
3 changes: 3 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
.vscode/
build/
include/config.h
25 changes: 25 additions & 0 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
cmake_minimum_required(VERSION 3.11)

project(rdmarb_demo)

set(CMAKE_CXX_STANDARD 17)

list(APPEND CMAKE_MODULE_PATH ${PROJECT_SOURCE_DIR}/cmake/Modules)

find_package(ibverbs REQUIRED)

add_compile_options(-Wall -Wextra -Wpedantic -O0 -g)

include_directories(include)

add_library(rdmarb_farm common.cpp farm.cpp)
target_link_libraries(rdmarb_farm ibverbs)




add_executable(producer farm_prod.cpp)
target_link_libraries(producer PRIVATE rdmarb_farm)

add_executable(consumer farm_cons.cpp)
target_link_libraries(consumer PRIVATE rdmarb_farm)
17 changes: 17 additions & 0 deletions cmake/Modules/Findibverbs.cmake
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
find_path(IBVERBS_INCLUDE_DIRS
NAMES infiniband/verbs.h
HINTS
${IBVERBS_INCLUDE_DIR}
${IBVERBS_ROOT_DIR}
${IBVERBS_ROOT_DIR}/include)

find_library(IBVERBS_LIBRARIES
NAMES ibverbs
HINTS
${IBVERBS_LIB_DIR}
${IBVERBS_ROOT_DIR}
${IBVERBS_ROOT_DIR}/lib)

include(FindPackageHandleStandardArgs)
find_package_handle_standard_args(ibverbs DEFAULT_MSG IBVERBS_INCLUDE_DIRS IBVERBS_LIBRARIES)
mark_as_advanced(IBVERBS_INCLUDE_DIR IBVERBS_LIBRARIES)
Loading

0 comments on commit 0a95ca8

Please sign in to comment.