diff --git a/cmake/modules/CheckYasm.cmake b/cmake/modules/CheckYasm.cmake index cbbbe918d086d..557ddc9fa66e9 100644 --- a/cmake/modules/CheckYasm.cmake +++ b/cmake/modules/CheckYasm.cmake @@ -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()