1 diff --git a/./CMake/FindLLVM.cmake b/../Beignet-1.1.2-Source_new/CMake/FindLLVM.cmake
2 index a148321..96cafb8 100644
3 --- a/./CMake/FindLLVM.cmake
4 +++ b/../Beignet-1.1.2-Source_new/CMake/FindLLVM.cmake
5 @@ -22,6 +22,7 @@ if (LLVM_CONFIG_EXECUTABLE)
6 else (LLVM_CONFIG_EXECUTABLE)
7 message(FATAL_ERROR "Could NOT find LLVM executable, please add -DLLVM_INSTALL_DIR=/path/to/llvm-config/ in cmake command")
8 endif (LLVM_CONFIG_EXECUTABLE)
11 COMMAND ${LLVM_CONFIG_EXECUTABLE} --version
12 OUTPUT_VARIABLE LLVM_VERSION
13 @@ -44,10 +45,16 @@ if (LLVM_FIND_VERSION_MAJOR AND LLVM_FIND_VERSION_MINOR)
14 endif (LLVM_VERSION_NODOT VERSION_LESS LLVM_FIND_VERSION_NODOT)
15 endif (LLVM_FIND_VERSION_MAJOR AND LLVM_FIND_VERSION_MINOR)
17 -if (LLVM_INSTALL_DIR)
18 +if (CLANG_INSTALL_DIR)
19 find_program(CLANG_EXECUTABLE
20 NAMES clang-${LLVM_VERSION_NODOT} clang-${LLVM_VERSION_NOPATCH} clang
21 - PATHS ${LLVM_INSTALL_DIR} NO_DEFAULT_PATH)
22 + PATHS ${CLANG_INSTALL_DIR} NO_DEFAULT_PATH)
23 +else (CLANG_INSTALL_DIR)
24 + find_program(CLANG_EXECUTABLE
25 + NAMES clang-${LLVM_VERSION_NODOT} clang-${LLVM_VERSION_NOPATCH} clang)
26 +endif (CLANG_INSTALL_DIR)
28 +if (LLVM_INSTALL_DIR)
29 find_program(LLVM_AS_EXECUTABLE
30 NAMES llvm-as-${LLVM_VERSION_NODOT} llvm-as-${LLVM_VERSION_NOPATCH} llvm-as
31 PATHS ${LLVM_INSTALL_DIR} NO_DEFAULT_PATH)
32 @@ -55,8 +62,6 @@ if (LLVM_INSTALL_DIR)
33 NAMES llvm-link-${LLVM_VERSION_NODOT} llvm-link-${LLVM_VERSION_NOPATCH} llvm-link
34 PATHS ${LLVM_INSTALL_DIR} NO_DEFAULT_PATH)
35 else (LLVM_INSTALL_DIR)
36 - find_program(CLANG_EXECUTABLE
37 - NAMES clang-${LLVM_VERSION_NODOT} clang-${LLVM_VERSION_NOPATCH} clang)
38 find_program(LLVM_AS_EXECUTABLE
39 NAMES llvm-as-${LLVM_VERSION_NODOT} llvm-as-${LLVM_VERSION_NOPATCH} llvm-as)
40 find_program(LLVM_LINK_EXECUTABLE
41 @@ -105,7 +110,7 @@ endif (LLVM_VERSION_NODOT VERSION_GREATER 34)
42 macro(add_one_lib name)
43 FIND_LIBRARY(CLANG_LIB
45 - PATHS ${LLVM_LIBRARY_DIR} NO_DEFAULT_PATH)
46 + PATHS ${CLANG_LIBRARY_DIR} NO_DEFAULT_PATH)
47 set(CLANG_LIBRARIES ${CLANG_LIBRARIES} ${CLANG_LIB})
48 unset(CLANG_LIB CACHE)