Use CMake variables instead of as

This commit is contained in:
Rafael Cardoso Fernandes Sousa 2021-12-10 17:35:28 -06:00
parent 23a7561353
commit d38110a5ce
1 changed files with 10 additions and 4 deletions

View File

@ -106,10 +106,16 @@ if (CMAKE_C_COMPILER STREQUAL loongcc)
endif ()
if (POWER)
set (NO_WARMUP 1)
execute_process(COMMAND bash -c "as -v < /dev/null 2>&1 | grep GNU 2>&1 >/dev/null" RESULT_VARIABLE HAVE_GAS)
set(GETARCH_FLAGS "${GETARCH_FLAGS} -DHAVE_GAS=${HAVE_GAS}")
endif()
set(NO_WARMUP 1)
set(HAVE_GAS 1)
if (CMAKE_ASM_COMPILER_ID STREQUAL "GNU")
set(HAVE_GAS 0)
elseif (CMAKE_ASM_COMPILER_ID STREQUAL "Clang")
set(CCOMMON_OPT "${CCOMMON_OPT} -fno-integrated-as")
set(HAVE_GAS 0)
endif ()
set(GETARCH_FLAGS "${GETARCH_FLAGS} -DHAVE_GAS=${HAVE_GAS}")
endif ()
#if don't use Fortran, it will only compile CBLAS.
if (ONLY_CBLAS)