ImportLLVM Module
Module imports LLVM into the ComputeAorta build by pulling in LLVM CMake
modules from the install directory of a build.
User option CA_LLVM_INSTALL_DIR is required to be set
to the filepath of the LLVM install before including this module. The option
CA_RUNTIME_COMPILER_ENABLED is also required to be TRUE
to use this module, otherwise a LLVM-less offline build is desired.
set(CA_LLVM_INSTALL_DIR "<path/to/install/directory>")
set(CA_RUNTIME_COMPILER_ENABLED TRUE)
include(ImportLLVM)
Using this location we append the directories containing LLVM CMake modules to CMAKE_MODULE_PATH, and import the following LLVM modules:
LLVMConfigfor LLVM.ClangTargetsfor Clang.
Once the modules are included we verify the LLVM version is supported and set some additional compile definitions.
- CA_LLVM_VERSIONS
Defines a list of supported LLVM versions, used to verify that
LLVM_PACKAGE_VERSIONfrom the imported LLVM install is a supported version.