summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorManuel Bentele2021-06-24 12:17:03 +0200
committerManuel Bentele2021-06-24 12:17:03 +0200
commit47062b2a1d3541a347e4ce5a617bbcbc35f2b9d7 (patch)
tree10d7134208b6e319abc2643157354b9581f490a8
parent[BUILD] Add support for RockyLinux 8 (diff)
downloaddnbd3-47062b2a1d3541a347e4ce5a617bbcbc35f2b9d7.tar.gz
dnbd3-47062b2a1d3541a347e4ce5a617bbcbc35f2b9d7.tar.xz
dnbd3-47062b2a1d3541a347e4ce5a617bbcbc35f2b9d7.zip
[BUILD] Add CMake option to enable build of dnbd3-bench
-rw-r--r--.github/workflows/build.yml1
-rw-r--r--.github/workflows/lint.yml3
-rw-r--r--CMakeLists.txt1
-rw-r--r--README.md1
-rw-r--r--src/CMakeLists.txt4
5 files changed, 8 insertions, 2 deletions
diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml
index 8eff91a..ae3a940 100644
--- a/.github/workflows/build.yml
+++ b/.github/workflows/build.yml
@@ -59,6 +59,7 @@ jobs:
cmake -B ${{ github.workspace }}/build \
-S ${{ github.workspace }} \
-D CMAKE_BUILD_TYPE=${{ matrix.config.build-type }} \
+ -D DNBD3_BENCHMARK=ON \
-D DNBD3_SERVER_FUSE=${{ matrix.config.build-cfg-server-fuse }} \
-D DNBD3_RELEASE_HARDEN=${{ matrix.config.build-cfg-harden }}
- name: Build dnbd3 artifacts
diff --git a/.github/workflows/lint.yml b/.github/workflows/lint.yml
index c490065..99195d9 100644
--- a/.github/workflows/lint.yml
+++ b/.github/workflows/lint.yml
@@ -28,7 +28,8 @@ jobs:
- name: Configure dnbd3 build
run: |
cmake -B ${{ github.workspace }}/build \
- -S ${{ github.workspace }}
+ -S ${{ github.workspace }} \
+ -D DNBD3_BENCHMARK=ON
- name: Lint dnbd3 artifacts
working-directory: ${{ github.workspace }}/build
run: make lint
diff --git a/CMakeLists.txt b/CMakeLists.txt
index bb613df..4047d14 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -12,6 +12,7 @@ project(dnbd3
# define project options to define build configuration
OPTION(DNBD3_KERNEL_MODULE "Build the dnbd3 Linux kernel module" ON)
+OPTION(DNBD3_BENCHMARK "Enable build of dnbd3-bench" OFF)
OPTION(DNBD3_CLIENT_FUSE "Enable build of dnbd3-fuse" ON)
OPTION(DNBD3_SERVER "Enable build of dnbd3-server" ON)
OPTION(DNBD3_SERVER_FUSE "Enable FUSE-Integration for dnbd3-server" OFF)
diff --git a/README.md b/README.md
index 2f4dde8..fb4adab 100644
--- a/README.md
+++ b/README.md
@@ -225,6 +225,7 @@ A build of the dnbd3 components can be configured and customized by the followin
| `KERNEL_INSTALL_DIR` | PATH | {`a` .. `z`, `A` .. `Z`, `/`, `_`, `-`} | /lib/modules/`uname -r`/extra | Path to install Linux kernel modules. |
| `KERNEL_SCRIPTS_DIR` | PATH | {`a` .. `z`, `A` .. `Z`, `/`, `_`, `-`} | /lib/modules/`uname -r`/build/scripts | Path to Linux kernel scripts directory. |
| `DNBD3_KERNEL_MODULE` | OPTION | {`ON`, `OFF`} | `ON` | Build the dnbd3 Linux kernel module. |
+| `DNBD3_BENCHMARK` | OPTION | {`ON`, `OFF`} | `OFF` | Enable build of dnbd3-bench. |
| `DNBD3_CLIENT_FUSE` | OPTION | {`ON`, `OFF`} | `ON` | Enable build of dnbd3-fuse. |
| `DNBD3_SERVER` | OPTION | {`ON`, `OFF`} | `ON` | Enable build of dnbd3-server. |
| `DNBD3_SERVER_FUSE` | OPTION | {`ON`, `OFF`} | `OFF` | Enable FUSE-Integration for dnbd3-server. |
diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt
index d14b023..96ffcae 100644
--- a/src/CMakeLists.txt
+++ b/src/CMakeLists.txt
@@ -4,7 +4,9 @@ cmake_minimum_required(VERSION 3.10)
project(dnbd3-src
LANGUAGES C)
-add_subdirectory(bench)
+if(DNBD3_BENCHMARK)
+ add_subdirectory(bench)
+endif(DNBD3_BENCHMARK)
if(DNBD3_KERNEL_MODULE)
add_subdirectory(client)