[llvm] r200595 - Introduce line editor library.

Peter Collingbourne peter at pcc.me.uk
Tue Feb 4 12:10:40 PST 2014


On Tue, Feb 04, 2014 at 02:56:12AM -0500, David Fang wrote:
> Hi,
> 	Do you have a way to tell cmake where to look for histedit.h?  I happen 
> to be on a system where /usr/include/histedit.h is tool old and has  
> compilation errors:
>
> /Users/fang/local/src/LLVM-svn/llvm/lib/LineEditor/LineEditor.cpp: In  
> function 'unsigned char ElCompletionFn(EditLine*, int)':
> /Users/fang/local/src/LLVM-svn/llvm/lib/LineEditor/LineEditor.cpp:124:  
> error: 'EL_GETFP' was not declared in this scope
> /Users/fang/local/src/LLVM-svn/llvm/lib/LineEditor/LineEditor.cpp: In  
> destructor 'llvm::LineEditor::~LineEditor()':
> /Users/fang/local/src/LLVM-svn/llvm/lib/LineEditor/LineEditor.cpp:232:  
> error: 'EL_GETFP' was not declared in this scope
> make[2]: ***  
> [lib/LineEditor/CMakeFiles/LLVMLineEditor.dir/LineEditor.cpp.o] Error 1
>
> However, I have a newer one installed in another location.
> Is there a way to point it to use a different root besides passing  
> -I/path/include
> to CMAKE_CXX_FLAGS and passing -L/path/lib to CMAKE_*_LINKER_FLAGS?

Not as far as I know. I'd prefer to try to avoid having to add such a
mechanism though.

> It might also be nice to test for histedit meeting some minimum version 
> or feature requirement.

According to the NetBSD repo it looks like EL_GETFP was introduced back
in 2006, but it's easy enough to avoid using it (r200794). The next newest
feature we use appears to be EL_CLIENTDATA which was added in 2001. I think
that's sufficiently old as to not require feature testing but if anyone else
complains I guess we can introduce a feature test for EL_CLIENTDATA.

Thanks,
-- 
Peter



More information about the llvm-commits mailing list