Skip to content

Commit 9f1a366

Browse files
authored
Make sure benchmark::benchmark stays optional (O2-1973) (#5231)
1 parent 3c2ed29 commit 9f1a366

3 files changed

Lines changed: 8 additions & 2 deletions

File tree

Framework/Utils/CMakeLists.txt

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -87,6 +87,7 @@ o2_add_test(DPLRawParser
8787
COMPONENT_NAME DPLUtils
8888
LABELS dplutils)
8989

90+
if (TARGET benchmark::benchmark)
9091
foreach(b
9192
RawParser
9293
)
@@ -96,3 +97,4 @@ foreach(b
9697
LABELS dplutils benchmark
9798
PUBLIC_LINK_LIBRARIES O2::DPLUtils benchmark::benchmark)
9899
endforeach()
100+
endif()

Utilities/Mergers/CMakeLists.txt

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -47,6 +47,7 @@ o2_add_executable(benchmark-empty-loop
4747
COMPONENT_NAME mergers
4848
PUBLIC_LINK_LIBRARIES O2::Mergers)
4949

50+
if (TARGET benchmark::benchmark)
5051
o2_add_executable(benchmark-miscellaneous
5152
SOURCES test/benchmark_Miscellaneous.cxx
5253
COMPONENT_NAME mergers
@@ -66,6 +67,7 @@ o2_add_executable(benchmark-types
6667
SOURCES test/benchmark_Types.cxx
6768
COMPONENT_NAME mergers
6869
PUBLIC_LINK_LIBRARIES O2::Mergers benchmark::benchmark)
70+
endif()
6971

7072
o2_add_test(InfrastructureBuilder
7173
SOURCES test/test_InfrastructureBuilder.cxx
@@ -83,4 +85,4 @@ o2_add_test(ObjectStore
8385
SOURCES test/test_ObjectStore.cxx
8486
COMPONENT_NAME mergers
8587
PUBLIC_LINK_LIBRARIES O2::Mergers
86-
LABELS utils)
88+
LABELS utils)

Utilities/rANS/CMakeLists.txt

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -35,11 +35,13 @@ o2_add_test(CombinedIterator
3535
COMPONENT_NAME rANS
3636
LABELS utils)
3737

38+
if (TARGET benchmark::benchmark)
3839
o2_add_executable(CombinedIterator
3940
SOURCES benchmarks/bench_ransCombinedIterator.cxx
4041
COMPONENT_NAME rANS
4142
IS_BENCHMARK
4243
PUBLIC_LINK_LIBRARIES O2::rANS benchmark::benchmark)
44+
endif()
4345

4446
o2_add_executable(rans-encode-decode-8
4547
TARGETVARNAME targetName
@@ -57,4 +59,4 @@ o2_add_executable(rans-encode-decode-32
5759
TARGETVARNAME targetName
5860
SOURCES run/bin-encode-decode.cxx
5961
PUBLIC_LINK_LIBRARIES O2::rANS Boost::program_options)
60-
target_compile_definitions(${targetName} PRIVATE -DSOURCE_T=uint32_t)
62+
target_compile_definitions(${targetName} PRIVATE -DSOURCE_T=uint32_t)

0 commit comments

Comments
 (0)