Update CMakeLists.txt to conditionally add the bench subdirectory based on the POET_PREPROCESS_BENCHS option

This commit is contained in:
Max Lübke 2024-05-06 11:26:13 +00:00
parent 22458b41f4
commit d399ca8190
3 changed files with 9 additions and 2 deletions

View File

@ -32,7 +32,7 @@ build-poet: # This job runs in the build stage, which runs first.
stage: build
script:
- mkdir -p build && cd build
- cmake -DPOET_ENABLE_TESTING=ON ..
- cmake -DPOET_ENABLE_TESTING=ON -DPOET_PREPROCESS_BENCHS=OFF ..
- make -j$(nproc)
cache:
key: build-$CI_COMMIT_BRANCH

View File

@ -20,7 +20,12 @@ find_package(MPI REQUIRED)
find_package(RRuntime REQUIRED)
add_subdirectory(src)
add_subdirectory(bench)
option(POET_PREPROCESS_BENCHS "Preprocess benchmarks" ON)
if (POET_PREPROCESS_BENCHS)
add_subdirectory(bench)
endif()
# as tug will also pull in doctest as a dependency
set(TUG_ENABLE_TESTING OFF CACHE BOOL "" FORCE)

View File

@ -73,6 +73,8 @@ following available options:
- **POET_PHT_ADDITIONAL_INFO**=_boolean_ - enabling the count of accesses to one
PHT bucket. Use with caution, as things will get slowed down significantly.
Defaults to _OFF_.
- **POET_PREPROCESS_BENCHS**=*boolean* - enables the preprocessing of predefined
models/benchmarks. Defaults to *ON*.
### Example: Build from scratch