diff options
author | Luo <xionghu.luo@intel.com> | 2014-07-08 09:07:54 +0800 |
---|---|---|
committer | Zhigang Gong <zhigang.gong@intel.com> | 2014-07-08 14:36:52 +0800 |
commit | 83a44bc815f51af7eed46507b1e0a2720ed62b37 (patch) | |
tree | 8bab7cb6311fa662932ab1fed6e93e85abe4d17f /src/CMakeLists.txt | |
parent | f2111f368d9d7eeafe1762ecb0160d9da69d9214 (diff) | |
download | beignet-83a44bc815f51af7eed46507b1e0a2720ed62b37.tar.gz |
remove lspci, gbe_bin_genenrater would generator llvm binary by default.
driver can get chipset id by ioctl instead of calling lspci in cmake;
user could generator gen binary by configuring cmake option
-DGEN_PCI_ID=xxxx or calling the gbe_bin_generater with option -t
GEN_PCI_ID.
v2: add "\0GENC" magic code for gen binary, fix typo.
Signed-off-by: Luo <xionghu.luo@intel.com>
Reviewed-by: Zhigang Gong <zhigang.gong@linux.intel.com>
Diffstat (limited to 'src/CMakeLists.txt')
-rw-r--r-- | src/CMakeLists.txt | 32 |
1 files changed, 13 insertions, 19 deletions
diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt index 9b419320..45c83d42 100644 --- a/src/CMakeLists.txt +++ b/src/CMakeLists.txt @@ -5,30 +5,24 @@ include_directories(${CMAKE_CURRENT_SOURCE_DIR} ${CMAKE_CURRENT_SOURCE_DIR}/../include ${MESA_SOURCE_INCLUDES}) -if (NOT GEN_PCI_ID) -# lspci - Find_Program(LSPCI lspci) - IF(LSPCI) - MESSAGE(STATUS "Looking for lspci - found") - ELSE(LSPCI) - MESSAGE(FATAL_ERROR "Looking for lspci - not found") - ENDIF(LSPCI) - execute_process(COMMAND "${CMAKE_CURRENT_SOURCE_DIR}/GetGenID.sh" - OUTPUT_VARIABLE GEN_PCI_ID) - message(STATUS "Platform Gen PCI id is " ${GEN_PCI_ID}) - set(GEN_PCI_ID ${GEN_PCI_ID} PARENT_SCOPE) -endif (NOT GEN_PCI_ID) - macro (MakeKernelBinStr KERNEL_PATH KERNEL_FILES) foreach (KF ${KERNEL_FILES}) set (input_file ${KERNEL_PATH}/${KF}.cl) set (output_file ${KERNEL_PATH}/${KF}_str.c) list (APPEND KERNEL_STR_FILES ${output_file}) - add_custom_command( - OUTPUT ${output_file} - COMMAND rm -rf ${output_file} - COMMAND ${GBE_BIN_GENERATER} -s ${input_file} -o${output_file} -t${GEN_PCI_ID} - DEPENDS ${input_file} ${CMAKE_CURRENT_BINARY_DIR}/../backend/src/gbe_bin_generater) + if(GEN_PCI_ID) + add_custom_command( + OUTPUT ${output_file} + COMMAND rm -rf ${output_file} + COMMAND ${GBE_BIN_GENERATER} -s ${input_file} -o${output_file} -t${GEN_PCI_ID} + DEPENDS ${input_file} ${CMAKE_CURRENT_BINARY_DIR}/../backend/src/gbe_bin_generater) + else(GEN_PCI_ID) + add_custom_command( + OUTPUT ${output_file} + COMMAND rm -rf ${output_file} + COMMAND ${GBE_BIN_GENERATER} -s ${input_file} -o${output_file} + DEPENDS ${input_file} ${CMAKE_CURRENT_BINARY_DIR}/../backend/src/gbe_bin_generater) + endif(GEN_PCI_ID) endforeach (KF) endmacro (MakeKernelBinStr) |