From 6761a838a3750998ffc0e315d429168858a80a0a Mon Sep 17 00:00:00 2001 From: Kefu Chai Date: Fri, 19 May 2017 12:46:46 +0800 Subject: [PATCH] cmake: check the existence of gperf before using it Signed-off-by: Kefu Chai --- src/rgw/CMakeLists.txt | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/src/rgw/CMakeLists.txt b/src/rgw/CMakeLists.txt index 53583652acdfe..591d136ccae8c 100644 --- a/src/rgw/CMakeLists.txt +++ b/src/rgw/CMakeLists.txt @@ -25,10 +25,14 @@ add_custom_target(civetweb_h "${CMAKE_BINARY_DIR}/src/include/civetweb" COMMENT "keep civetweb.h up-to-date") +find_program(GPERF gperf) +if(NOT GPERF) + message(FATAL_ERROR "Can't find gperf") +endif() function(gperf_generate input output) add_custom_command( OUTPUT ${output} - COMMAND gperf ${input} > ${output} + COMMAND ${GPERF} ${input} > ${output} DEPENDS ${input} COMMENT "Generate ${output}" ) -- 2.39.5