Skip to content

Commit

Permalink
add function
Browse files Browse the repository at this point in the history
  • Loading branch information
victoryang00 committed Aug 18, 2023
1 parent 2c3d6c9 commit 0b022a4
Show file tree
Hide file tree
Showing 7 changed files with 12 additions and 19 deletions.
8 changes: 1 addition & 7 deletions .github/workflows/cmake.yml
Original file line number Diff line number Diff line change
Expand Up @@ -23,14 +23,8 @@ jobs:
- name: Install dependencies
run: sudo apt install llvm-dev clang libbpf-dev libclang-dev python3-pip

- name: Install Custom dependencies
run: wget http://launchpadlibrarian.net/605552811/libbpf0_0.8.0-1_amd64.deb && wget http://launchpadlibrarian.net/605552807/libbpf-dev_0.8.0-1_amd64.deb && sudo dpkg -i ./libbpf0_0.8.0-1_amd64.deb && sudo dpkg -i ./libbpf-dev_0.8.0-1_amd64.deb

- name: Sed Current uncompiled include file
run: sudo sed -i 's/NL_SET_ERR_MSG_MOD/\/\/NL_SET_ERR_MSG_MOD/g' /usr/src/linux-headers-`uname -r`/include/net/flow_offload.h

- name: Install conan
run: pip3 install conan && conan profile detect && mkdir build && cd build && conan install ..
run: pip3 install conan && conan profile detect && mkdir build && cd build && cp ../conanfile.txt && conan install .

- name: Configure CMake
# Configure CMake in a 'build' subdirectory. `CMAKE_BUILD_TYPE` is only required if you are using a single-configuration generator such as make.
Expand Down
3 changes: 2 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -10,4 +10,5 @@ Makefile
py_smdk_pkg
lib
*conan*
CMakePresets.json
CMakePresets.json
.cmake
7 changes: 3 additions & 4 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,11 +1,10 @@
cmake_minimum_required(VERSION 3.11.0)
project(CXL-MEM-Simulator VERSION 0.1.0)

list(APPEND CMAKE_MODULE_PATH ${CMAKE_BINARY_DIR})
list(APPEND CMAKE_PREFIX_PATH ${CMAKE_BINARY_DIR})

find_package(cxxopts REQUIRED)
find_package(fmt REQUIRED)
find_package(range-v3 REQUIRED)
file(GLOB_RECURSE SOURCE_FILES src/*.cpp)

execute_process(COMMAND uname -r OUTPUT_VARIABLE arch OUTPUT_STRIP_TRAILING_WHITESPACE)
Expand All @@ -14,7 +13,7 @@ set(CMAKE_CXX_STANDARD 23)

add_executable(CXL-MEM-Simulator ${SOURCE_FILES})

include_directories(CXL-MEM-Simulator include)
target_link_libraries(CXL-MEM-Simulator cxxopts::cxxopts fmt::fmt range-v3::range-v3)
include_directories(CXL-MEM-Simulator include ${cxxopts_INCLUDE_DIR} ${fmt_INCLUDE_DIR})
target_link_libraries(CXL-MEM-Simulator fmt::fmt cxxopts::cxxopts)

add_subdirectory(microbench)
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ The epoch design of this project is mostly refering to [mes](https://github.com/
```bash
$ uname -a
Linux gpu01 5.19.0-29-generic #30-Ubuntu SMP PREEMPT_DYNAMIC Wed Jan 4 12:14:09 UTC 2023 x86_64 x86_64 x86_64 GNU/Linux
$ sudo apt install llvm-dev clang libbpf-dev libclang-dev libcxxopts-dev libfmt-dev librange-v3-dev
$ sudo apt install llvm-dev clang libbpf-dev libclang-dev libcxxopts-dev libfmt-dev
```
## User input
```bash
Expand Down
2 changes: 1 addition & 1 deletion artifact/build_and_run_all.sh
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
#!/bin/bash

sudo apt install llvm-dev clang libbpf-dev libclang-dev libcxxopts-dev libfmt-dev librange-v3-dev ninja-build
sudo apt install llvm-dev clang libbpf-dev libclang-dev libcxxopts-dev libfmt-dev ninja-build

mkdir build
cd build
Expand Down
2 changes: 1 addition & 1 deletion artifact/gen_workloads.sh
Original file line number Diff line number Diff line change
@@ -1 +1 @@
#!/bin/bash
#!/bin/bash
7 changes: 3 additions & 4 deletions conanfile.txt
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
[requires]
cxxopts/2.2.1
fmt/7.1.3
range-v3/0.11.0
cxxopts/3.0.0
fmt/9.0.0

[generators]
CMakeToolchain
CMakeDeps

0 comments on commit 0b022a4

Please sign in to comment.