]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph.git/commitdiff
common: rename variable name to improve readability
authorChangcheng Liu <changcheng.liu@aliyun.com>
Wed, 28 Oct 2020 00:59:09 +0000 (08:59 +0800)
committerChangcheng Liu <changcheng.liu@aliyun.com>
Thu, 29 Oct 2020 00:57:54 +0000 (08:57 +0800)
Signed-off-by: Changcheng Liu <changcheng.liu@aliyun.com>
cmake/modules/CheckYasm.cmake

index cbbbe918d086db82833e5825ddf10b2e1b2ed1bd..557ddc9fa66e91fc1d9266e3a4547c41c2fa7bf4 100644 (file)
@@ -1,4 +1,4 @@
-macro(check_yasm_support _object_format _good_result _better_result)
+macro(check_yasm_support _object_format _support_x64 _support_avx2)
   execute_process(
     COMMAND yasm -f "${_object_format}" ${CMAKE_SOURCE_DIR}/src/common/crc32c_intel_fast_asm.s -o /dev/null
     RESULT_VARIABLE no_yasm
@@ -17,7 +17,7 @@ macro(check_yasm_support _object_format _good_result _better_result)
       " not_arch_x32)
       set(CMAKE_REQUIRED_QUIET ${save_quiet})
       if(not_arch_x32)
-        set(${_good_result} TRUE)
+        set(${_support_x64} TRUE)
         execute_process(COMMAND yasm -f ${object_format} -i
           ${CMAKE_SOURCE_DIR}/src/isa-l/include/
           ${CMAKE_SOURCE_DIR}/src/isa-l/erasure_code/gf_vect_dot_prod_avx2.asm
@@ -26,7 +26,7 @@ macro(check_yasm_support _object_format _good_result _better_result)
           OUTPUT_QUIET
           ERROR_QUIET)
         if(NOT rc)
-          set(${_better_result} TRUE)
+          set(${_support_avx2} TRUE)
         endif(NOT rc)
       endif(not_arch_x32)
     endif(CMAKE_SYSTEM_PROCESSOR MATCHES "amd64|x86_64")
@@ -35,9 +35,9 @@ macro(check_yasm_support _object_format _good_result _better_result)
     message(STATUS "Could NOT find Yasm")
   elseif(NOT not_arch_x32)
     message(STATUS "Found Yasm: but x86_64 with x32 ABI is not supported")
-  elseif(${_better_result})
+  elseif(${_support_avx2})
     message(STATUS "Found Yasm: good -- capable of assembling x86_64 and AVX2")
-  elseif(${_good_result})
+  elseif(${_support_x64})
     message(STATUS "Found Yasm: better -- capable of assembling x86_64")
   endif()
 endmacro()