This is an archive of the discontinued LLVM Phabricator instance.

Use CMAKE_INSTALL_PREFIX for setting LLVM_INSTALL_PREFIX
Needs ReviewPublic

Authored by opoplawski on Feb 14 2017, 3:29 PM.
This revision needs review, but there are no reviewers specified.

Details

Reviewers
None
Summary

Using -get_filename_component() to compute the install prefix is fragile and subject to breakage in the presence of symbolic links. We know the install prefix via CMAKE_INSTALL_PREFIX, so use it.

This came out of part of my work testing parallel installable versions of llvm/clang for Fedora, and looking to be able to have clang's CMakeLists.txt be able to do:

find_package(LLVM 3.9 REQUIRED)
list(APPEND CMAKE_MODULE_PATH "${LLVM_CMAKE_DIR}")

to locate llvm.

Diff Detail

Event Timeline

opoplawski created this revision.Feb 14 2017, 3:29 PM