Skip to content

Commit 3c46195

Browse files
committed
Add tests for time -v
1 parent fcbf893 commit 3c46195

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

CMakeLists.txt

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,8 +23,12 @@ include(AddRootBench)
2323

2424
#---ROOTbench dependencies
2525
find_program(TIME_EXECUTABLE time)
26+
# Testing valid output of /usr/bin/time -v
27+
exec_program(${TIME_EXECUTABLE} ARGS -v ${CMAKE_COMMAND} -E environment OUTPUT_VARIABLE TIME_OUTPUT RETURN_VALUE TIME_EXECUTABLE_VALID)
2628
if(NOT TIME_EXECUTABLE)
27-
message(WARNING "/usr/bin/time is requirement for rootbench.git")
29+
if(NOT TIME_EXECUTABLE_VALID)
30+
message(FATAL_ERROR "/usr/bin/time is a requirement for rootbench.git")
31+
endif()
2832
endif()
2933

3034
# You need first to tell CMake where to find the ROOT installation. This can either be the

0 commit comments

Comments
 (0)