Skip to content

Commit a9bf8e1

Browse files
oshaduraHLilit
authored andcommitted
Adding /usr/bin/time and perf as dependencies to rootbench
1 parent c753402 commit a9bf8e1

File tree

1 file changed

+13
-1
lines changed

1 file changed

+13
-1
lines changed

CMakeLists.txt

Lines changed: 13 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,14 +13,20 @@ set(CMAKE_MODULE_PATH
1313
"${CMAKE_CURRENT_SOURCE_DIR}/cmake/modules"
1414
)
1515

16-
#Define ROOTbench source tree
16+
#---Define ROOTbench source tree
1717
set(ROOTBENCH_SOURCE_DIR ${CMAKE_CURRENT_SOURCE_DIR})
1818

1919
#---Include rootbench options
2020
include(RootBenchOptions)
2121

2222
include(AddRootBench)
2323

24+
#---ROOTbench dependencies
25+
find_program(TIME_EXECUTABLE time)
26+
if(NOT TIME_EXECUTABLE)
27+
message(WARNING "/usr/bin/time is requirement for rootbench.git")
28+
endif()
29+
2430
# You need first to tell CMake where to find the ROOT installation. This can either be the
2531
# final ROOT installation or a local build directory. In both cases it is using
2632
# the $ROOTSYS environment variable to locate it.
@@ -54,6 +60,12 @@ endif()
5460

5561
include(GoogleBenchmark)
5662
if(flamegraph)
63+
# Check if perf is available in OS:
64+
find_program(PERF_EXECUTABLE perf)
65+
if(NOT PERF_EXECUTABLE)
66+
message(WARNING "Perf is not available in your system, please install it.")
67+
set(flamegraph OFF CACHE BOOL "")
68+
endif()
5769
include(FlameGraph)
5870
add_custom_target(flamegraph-download DEPENDS FlameGraph)
5971
endif()

0 commit comments

Comments
 (0)