[PATCH 1/1] build/cmake: Fix CMP0023 warning with libffi

Dan Liew dan at su-root.co.uk
Wed Sep 3 02:26:59 PDT 2014

Hi Jan,

>> anything wrong with this patch?

I'm CC'ing Brad King because he is much more of an expert on CMake
than I am. I'll try to take a look though...

>> >  if( LLVM_ENABLE_FFI )
>> > -  target_link_libraries( LLVMInterpreter ${FFI_LIBRARY_PATH} )
>> > +  target_link_libraries( LLVMInterpreter ${cmake_2_8_12_PRIVATE} ${FFI_LIBRARY_PATH} )
>> >  endif()

Shouldn't you be using ${cmake_2_8_12_INTERFACE} rather than
${cmake_2_8_12_PRIVATE}? If you build using libffi presumably any
client of LLVM using the interpreter needs to link against it too
hence this library should end up in INTERFACE_LINK_LIBRARIES (which
using INTERFACE in target_link_libraries will achieve)? Also seeing as
libLLVMInterpreter.a is a static library linking against libffi
doesn't make sense which is what PRIVATE does (AFAICT).

However I may of misunderstood the meaning of the PUBLIC, PRIVATE and
INTERFACE keywords because I've never used them before and I'm my
understanding comes from just glancing at the cmake documentation.

More information about the llvm-commits mailing list