Page MenuHomePhabricator

[openmp] [cmake] Fix respecting LIBOMP_LLVM_LIT_EXECUTABLE as full path
ClosedPublic

Authored by mgorny on Sep 18 2016, 1:23 PM.

Details

Summary

Fix lit search to correctly respect LIBOMP_LLVM_LIT_EXECUTABLE as full program path.

The variable passed to find_program() is created by CMake as a cache variable, and therefore can be directly overriden by the user. Since this was the design of LIBOMP_LLVM_LIT_EXECUTABLE (as can be deduced from the error messages) and there is no other use of LIT_EXECUTABLE, remove the redundant variable and pass LIBOMP_LLVM_LIT_EXECUTABLE directly to find_program().

Furthermore, the previous code did not work since the HINTS argument specifies more search directories rather than expected full path. Quoting the CMake documentation:

  1. Search the paths specified by the HINTS option. These should be paths computed by system introspection, such as a hint provided by the location of another item already found. Hard-coded guesses should be specified with the PATHS option.

Diff Detail

Repository
rL LLVM

Event Timeline

mgorny updated this revision to Diff 71759.Sep 18 2016, 1:23 PM
mgorny retitled this revision from to [openmp] [cmake] Fix respecting LIBOMP_LLVM_LIT_EXECUTABLE as full path.
mgorny updated this object.
mgorny added reviewers: Hahnfeld, jlpeyton.
mgorny added a subscriber: openmp-commits.
Hahnfeld accepted this revision.Sep 18 2016, 11:53 PM
Hahnfeld edited edge metadata.

LGTM, thanks for finding and fixing this one!

This revision is now accepted and ready to land.Sep 18 2016, 11:53 PM
This revision was automatically updated to reflect the committed changes.