diff --git a/README.md b/README.md index 345f933..25d7747 100644 --- a/README.md +++ b/README.md @@ -49,10 +49,13 @@ you will need to have installed. If this is not the case, the configuration script will warn you. Monicelli is developed with version 6.8, but any sufficiently recent release should do just fine. -You will also need to have LLVM development libraries installed, version 6.0. -Other versions might or might not work. +You will also need to have LLVM development libraries installed, version 7, 8 or 9. +Other versions might or might not work. CMake looks for version 7 by default, you +can override this by setting the `MONICELLI_LLVM_VERSION` variable: -Finally, you will need CMake, version 3.0 or higher. + $ cmake -DMONICELLI_LLVM_VERSION=9 + +Finally, you will need CMake, version 3.7 or higher. A typical Makefile-based build workflow would be: diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt index 24d0455..efe4b6b 100644 --- a/src/CMakeLists.txt +++ b/src/CMakeLists.txt @@ -1,11 +1,12 @@ # Copyright 2017 the Monicelli project authors. All rights reserved. # Use of this source code is governed by a GPLv3 license, see LICENSE.txt. -find_package(LLVM 7 REQUIRED CONFIG) -find_package(Ragel REQUIRED) - -set(MONICELLI_LINKER ON CACHE BOOL "Enable the Monicelli linker. Requires POSIX.") set(MONICELLI_ARCH "x86" CACHE STRING "Target architecture for Monicelli.") +set(MONICELLI_LLVM_VERSION 7 CACHE STRING "LLVM version for Monicelli.") +set(MONICELLI_LINKER ON CACHE BOOL "Enable the Monicelli linker. Requires POSIX.") + +find_package(LLVM "${MONICELLI_LLVM_VERSION}" REQUIRED CONFIG) +find_package(Ragel REQUIRED) add_ragel_library(lexer lexer.rl