diff options
author | Guo Yejun <yejun.guo@intel.com> | 2014-04-24 02:18:00 +0800 |
---|---|---|
committer | Zhigang Gong <zhigang.gong@intel.com> | 2014-04-28 10:51:50 +0800 |
commit | d9c82a63de1b3fbf6ba0d2e1c9b8eeda52829531 (patch) | |
tree | 5249dcf89172f3020e13027a996861e9003e92ba | |
parent | b45252bc627dd6ceaff9a1998a5379452cf80e29 (diff) |
add support for cross compiler
Signed-off-by: Guo Yejun <yejun.guo@intel.com>
Reviewed-by: Zhigang Gong <zhigang.gong@linux.intel.com>
-rw-r--r-- | CMake/FindLLVM.cmake | 2 | ||||
-rw-r--r-- | backend/src/CMakeLists.txt | 8 |
2 files changed, 5 insertions, 5 deletions
diff --git a/CMake/FindLLVM.cmake b/CMake/FindLLVM.cmake index 97ee7db7..556b3a96 100644 --- a/CMake/FindLLVM.cmake +++ b/CMake/FindLLVM.cmake @@ -84,7 +84,7 @@ endif (LLVM_VERSION_NODOT VERSION_GREATER 34) macro(add_one_lib name) FIND_LIBRARY(CLANG_LIB NAMES ${name} - PATHS ${LLVM_LIBRARY_DIR} ) + PATHS ${LLVM_LIBRARY_DIR} NO_DEFAULT_PATH) set(CLANG_LIBRARIES ${CLANG_LIBRARIES} ${CLANG_LIB}) unset(CLANG_LIB CACHE) endmacro() diff --git a/backend/src/CMakeLists.txt b/backend/src/CMakeLists.txt index 6d0cfa89..2d596444 100644 --- a/backend/src/CMakeLists.txt +++ b/backend/src/CMakeLists.txt @@ -58,8 +58,8 @@ set (clang_cmd ${clang_cmd} -fno-builtin -DGEN7_SAMPLER_CLAMP_BORDER_WORKAROUND) add_custom_command( OUTPUT ${pch_object} COMMAND rm -f ${pch_object} - COMMAND clang ${clang_cmd} --relocatable-pch -emit-pch -isysroot ${CMAKE_CURRENT_BINARY_DIR} ${ocl_blob_file} -o ${pch_object} - COMMAND clang ${clang_cmd} -emit-pch ${ocl_blob_file} -o ${local_pch_object} + COMMAND ${CMAKE_BINARY_PATH}clang ${clang_cmd} --relocatable-pch -emit-pch -isysroot ${CMAKE_CURRENT_BINARY_DIR} ${ocl_blob_file} -o ${pch_object} + COMMAND ${CMAKE_BINARY_PATH}clang ${clang_cmd} -emit-pch ${ocl_blob_file} -o ${local_pch_object} DEPENDS ${ocl_blob_file} ) @@ -71,14 +71,14 @@ macro(ll_add_library ll_lib ll_sources) add_custom_command( OUTPUT ${ll}.bc COMMAND rm -f ${ll}.bc - COMMAND llvm-as -o ${ll}.bc ${GBE_SOURCE_DIR}/src/${ll} + COMMAND ${CMAKE_BINARY_PATH}llvm-as -o ${ll}.bc ${GBE_SOURCE_DIR}/src/${ll} DEPENDS ${ll} ) set (ll_objects ${ll_objects} ${ll}.bc) endforeach (ll ${ll_sources}) add_custom_command( OUTPUT ${ll_lib} - COMMAND llvm-link -o ${ll_lib} ${ll_objects} + COMMAND ${CMAKE_BINARY_PATH}llvm-link -o ${ll_lib} ${ll_objects} DEPENDS ${ll_objects} ) add_custom_target(${ll_lib} |