Merge pull request #298 from emankov/master

[HIPIFY][cmake] Fix require_program function

[ROCm/hip commit: 1026e58ad9]
This commit is contained in:
Maneesh Gupta
2017-12-19 08:42:27 +05:30
committad av GitHub
förälder 95b4e6229a 3f9d032f69
incheckning 8f0e9a3efb
+5 -3
Visa fil
@@ -68,9 +68,11 @@ if (HIPIFY_CLANG_TESTS)
find_package(PythonInterp 2.7 REQUIRED EXACT)
function (require_program PROGRAM_NAME)
find_program(FOUND_PROGRAM ${PROGRAM_NAME})
if (NOT FOUND_PROGRAM)
message(FATAL_ERROR "Can't find ${PROGRAM_NAME}. Either set HIPIFY_CLANG_TESTS to OFF to disable hipify tests, or install the missing program.")
find_program(FOUND_${PROGRAM_NAME} ${PROGRAM_NAME})
if (FOUND_${PROGRAM_NAME})
message(STATUS "Found ${PROGRAM_NAME}: ${FOUND_${PROGRAM_NAME}}")
else()
message(SEND_ERROR "Can't find ${PROGRAM_NAME}. Either set HIPIFY_CLANG_TESTS to OFF to disable hipify tests, or install the missing program.")
endif()
endfunction()