[Build]Make set target arch universal (#2660)

This commit is contained in:
WingC
2020-01-06 00:46:07 -06:00
committed by ZHAO Chun
parent 87a50070c4
commit 7f148c188e

View File

@ -40,7 +40,8 @@ string(TOUPPER ${CMAKE_BUILD_TYPE} CMAKE_BUILD_TYPE)
message(STATUS "Build type is ${CMAKE_BUILD_TYPE}")
# set CMAKE_BUILD_TARGET_ARCH
execute_process(COMMAND bash "-c" "lscpu | grep 'Architecture' | awk '{print $2}'"
# use `lscpu | grep 'Architecture' | awk '{print $2}'` only support system which language is en_US.UTF-8
execute_process(COMMAND bash "-c" "uname -m"
OUTPUT_VARIABLE
CMAKE_BUILD_TARGET_ARCH
OUTPUT_STRIP_TRAILING_WHITESPACE)