diff --git a/cmake/CheckAmdGpu.cmake b/cmake/CheckAmdGpu.cmake index 3b26bfa5e..217356496 100644 --- a/cmake/CheckAmdGpu.cmake +++ b/cmake/CheckAmdGpu.cmake @@ -18,8 +18,8 @@ enable_language(HIP) set(CHECK_SRC "${CMAKE_CURRENT_SOURCE_DIR}/cmake/check_amd_gpu.hip") -try_run(RUN_RESULT COMPILE_SUCCESS SOURCES ${CHECK_SRC}) +try_compile(COMPILE_SUCCESS SOURCES ${CHECK_SRC}) -if(COMPILE_SUCCESS AND RUN_RESULT EQUAL 0) +if(COMPILE_SUCCESS) set(AMD_FOUND "TRUE") endif()