AnyDSL / thorin

The Higher-Order Intermediate Representation
https://anydsl.github.io
GNU Lesser General Public License v3.0
151 stars 15 forks source link

avoid RV package import if target already supplied via LLVM #114

Open michael-kenzel opened 3 years ago

michael-kenzel commented 3 years ago

This change skips find_package(RV) if the RV target was already imported as part of LLVM and makes RV a public dependency of thorin to allow for transitive dependencies. It also changes the thorin CMake import to require LLVM and RV if thorin was compiled with LLVM+RV support. Having Thorin_HAS_LLVM_SUPPORT/Thorin_HAS_RV_SUPPORT report True without LLVM/RV actually being there does not seem very useful, and having the respective imports fail quietly makes debugging build issues where the thorin build finds the packages but the import of thorin into another component doesn't find them pretty frustrating.