]> git.apps.os.sepia.ceph.com Git - ceph.git/commitdiff
cmake: check the existence of gperf before using it 15164/head
authorKefu Chai <kchai@redhat.com>
Fri, 19 May 2017 04:46:46 +0000 (12:46 +0800)
committerKefu Chai <kchai@redhat.com>
Fri, 19 May 2017 04:47:26 +0000 (12:47 +0800)
Signed-off-by: Kefu Chai <kchai@redhat.com>
src/rgw/CMakeLists.txt

index 53583652acdfec563e5018776268bbc98c86eb9c..591d136ccae8ce0615a88652512904186c894861 100644 (file)
@@ -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}"
     )