Don't reinvent find_package

PythonInterp is a finder module that ships with cmake. It supports
the conventional interaction with find_package that allows you
to demand success, and particular vesions, without having your
own logic:

https://cmake.org/cmake/help/v3.0/command/find_package.html


[ROCm/clr commit: c62766f880]
이 커밋은 다음에 포함됨:
Chris Kitching가 2017-10-19 17:08:53 +01:00를 커밋했습니다
1 부모 35943634ea
커밋 95e1706537
1 파일이 변경됨
+1 -8
+1 -8
파일 보기
@@ -66,14 +66,7 @@ install(TARGETS hipify-clang DESTINATION bin)
if (HIPIFY_CLANG_TESTS)
# tests
set(Python_ADDITIONAL_VERSIONS 2.7)
include(FindPythonInterp)
if(NOT PYTHONINTERP_FOUND)
message(FATAL_ERROR
"Unable to find Python interpreter, required for builds and testing.\n\n"
"Please install Python or specify the PYTHON_EXECUTABLE CMake variable.")
endif()
find_package(PythonInterp 2.7 REQUIRED EXACT)
find_program(LIT_COMMAND lit)
set(BINARY_DIR ${CMAKE_CURRENT_BINARY_DIR})