[LLVMdev] [RFC] Improving the testing of exported LLVM CMake targets

Dan Liew dan at su-root.co.uk
Mon Jun 29 08:22:23 PDT 2015


Hi,


On 29 June 2015 at 01:30, Mueller-Roemer, Johannes Sebastian
<Johannes.Sebastian.Mueller-Roemer at igd.fraunhofer.de> wrote:
>> Second, the LLVM CMake files (LLVMConfig.cmake and LLVMExports.cmake) are not relocatable (they contain absolute paths which are based on the install prefix). So even if the first issue is fixed we still have the problem that a user cannot simply extract the binary tarball to an arbitrary location their system and build the toy project against it.
>
> Really? My latest LLVMConfig (beginning of this month) is relative to "LLVM_INSTALL_PREFIX" which is set by
>
> get_filename_component(LLVM_INSTALL_PREFIX "${CMAKE_CURRENT_LIST_FILE}" PATH)
> get_filename_component(LLVM_INSTALL_PREFIX "${LLVM_INSTALL_PREFIX}" PATH)
> get_filename_component(LLVM_INSTALL_PREFIX "${LLVM_INSTALL_PREFIX}" PATH)
> get_filename_component(LLVM_INSTALL_PREFIX "${LLVM_INSTALL_PREFIX}" PATH)
>
> and analogously in LLVMExports:
>
> get_filename_component(_IMPORT_PREFIX "${CMAKE_CURRENT_LIST_FILE}" PATH)
> get_filename_component(_IMPORT_PREFIX "${_IMPORT_PREFIX}" PATH)
> get_filename_component(_IMPORT_PREFIX "${_IMPORT_PREFIX}" PATH)
> get_filename_component(_IMPORT_PREFIX "${_IMPORT_PREFIX}" PATH)
>
> Did someone change this recently?

No. It turns out I gave my install directories stupid names and I
confused the install directory of the Autoconf/Makefile build system
with the CMake one. It is the CMake export files generated by the
Autoconf/Makefile build system which are not relocatable. Seeing as
the the non relocatable install behaviour is an issue with the
Autoconf/Makefile build system it should be fairly easy to fix.




More information about the llvm-dev mailing list