This repository has been archived by the owner on Aug 30, 2022. It is now read-only.
passthrough LLVM_DIR to unit tests external project #131
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Eosio has a dependency on LLVM 4.0. On Mac, when installed with brew, LLVM 4.0 is installed as a keg-only and so it does not link files outside of /usr/local/opt to avoid overwriting over system files. However, older version of the eosio build script did a force link which did overwrite the system files, but also made the CMake
find_package
of LLVM 4.0 to work.In the v1.4.4 release of eosio, a change to EosioTester.cmake was added to set LLVM_DIR, assuming it was not already set, on Macs (Linux already did not have this issue) to the standard path that brew would install it to. This allowed for eosio to build as well as any projects depending on eosio (like eosio.contracts) to build, even if no brew force link was done to overwrite the system files with LLVM 4.0 files.
When building with an eosio version older than v1.4.4 in a Mac environment that has not overwritten the LLVM files, an explicit path to
lib/cmake/llvm
directory within the LLVM root must be provided to successfully build. The same goes for building the unit tests of eosio.contracts.However, since the unit tests are an external CMake project, the variables defined on the command line of the
cmake
command do not by default pass through to the external project. So this PR makes changes toUnitTestExternalProject.txt
to explicitly pass through theLLVM_DIR
variable to the unit test external project.