From 0b022a48c85f9845c6f8637de9a15a66686b1647 Mon Sep 17 00:00:00 2001 From: victoryang00 Date: Fri, 18 Aug 2023 05:04:35 +0000 Subject: [PATCH] add function --- .github/workflows/cmake.yml | 8 +------- .gitignore | 3 ++- CMakeLists.txt | 7 +++---- README.md | 2 +- artifact/build_and_run_all.sh | 2 +- artifact/gen_workloads.sh | 2 +- conanfile.txt | 7 +++---- 7 files changed, 12 insertions(+), 19 deletions(-) diff --git a/.github/workflows/cmake.yml b/.github/workflows/cmake.yml index 966e526..fee8574 100644 --- a/.github/workflows/cmake.yml +++ b/.github/workflows/cmake.yml @@ -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. diff --git a/.gitignore b/.gitignore index 197ef8a..6f6bde3 100644 --- a/.gitignore +++ b/.gitignore @@ -10,4 +10,5 @@ Makefile py_smdk_pkg lib *conan* -CMakePresets.json \ No newline at end of file +CMakePresets.json +.cmake \ No newline at end of file diff --git a/CMakeLists.txt b/CMakeLists.txt index cddbbea..b32bf64 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -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) @@ -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) \ No newline at end of file diff --git a/README.md b/README.md index 2d2c453..bd7c72b 100644 --- a/README.md +++ b/README.md @@ -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 diff --git a/artifact/build_and_run_all.sh b/artifact/build_and_run_all.sh index 29eeac1..774e62c 100755 --- a/artifact/build_and_run_all.sh +++ b/artifact/build_and_run_all.sh @@ -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 diff --git a/artifact/gen_workloads.sh b/artifact/gen_workloads.sh index cc1f786..a9bf588 100644 --- a/artifact/gen_workloads.sh +++ b/artifact/gen_workloads.sh @@ -1 +1 @@ -#!/bin/bash \ No newline at end of file +#!/bin/bash diff --git a/conanfile.txt b/conanfile.txt index 9ff10fd..6a96060 100644 --- a/conanfile.txt +++ b/conanfile.txt @@ -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 \ No newline at end of file +CMakeDeps \ No newline at end of file