[Beignet] [PATCH v2] cmake: Fix linking with LLVM/Terminfo

Igor Gnatenko i.gnatenko.brain at gmail.com
Thu Feb 13 08:16:35 CET 2014


DEBUG: [  9%] Building CXX object backend/src/CMakeFiles/gbe_bin_generater.dir/gbe_bin_generater.cpp.o
DEBUG: Linking CXX executable gbe_bin_generater
DEBUG: /usr/lib64/llvm/libLLVMSupport.a(Process.o): In function `llvm::sys::Process::FileDescriptorHasColors(int)':
DEBUG: (.text+0x717): undefined reference to `setupterm'
DEBUG: /usr/lib64/llvm/libLLVMSupport.a(Process.o): In function `llvm::sys::Process::FileDescriptorHasColors(int)':
DEBUG: (.text+0x727): undefined reference to `tigetnum'
DEBUG: /usr/lib64/llvm/libLLVMSupport.a(Process.o): In function `llvm::sys::Process::FileDescriptorHasColors(int)':
DEBUG: (.text+0x730): undefined reference to `set_curterm'
DEBUG: /usr/lib64/llvm/libLLVMSupport.a(Process.o): In function `llvm::sys::Process::FileDescriptorHasColors(int)':
DEBUG: (.text+0x738): undefined reference to `del_curterm'

Signed-off-by: Igor Gnatenko <i.gnatenko.brain at gmail.com>
---
 backend/src/CMakeLists.txt | 4 ++++
 1 file changed, 4 insertions(+)

diff --git a/backend/src/CMakeLists.txt b/backend/src/CMakeLists.txt
index 33494a0..6db4a2a 100644
--- a/backend/src/CMakeLists.txt
+++ b/backend/src/CMakeLists.txt
@@ -188,6 +188,10 @@ target_link_libraries(
                       ${CMAKE_THREAD_LIBS_INIT}
                       ${CMAKE_DL_LIBS})
 
+if (LLVM_VERSION_NODOT VERSION_EQUAL 34)
+  target_link_libraries(gbe tinfo)
+endif(LLVM_VERSION_NODOT VERSION_EQUAL 34)
+
 link_directories (${LLVM_LIBRARY_DIR})
 ADD_EXECUTABLE(gbe_bin_generater gbe_bin_generater.cpp)
 TARGET_LINK_LIBRARIES(gbe_bin_generater gbe)
-- 
1.8.5.3



More information about the Beignet mailing list