From 25110521d0e13b276b451d022f84a1a57c423a3e Mon Sep 17 00:00:00 2001 From: Stefano Sanfilippo Date: Sun, 7 Jul 2019 09:52:40 +0200 Subject: [PATCH] Check LLVM version, rename RAGEL to RAGEL_EXECUTABLE. --- cmake/FindRagel.cmake | 8 ++++---- src/CMakeLists.txt | 2 +- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/cmake/FindRagel.cmake b/cmake/FindRagel.cmake index f942e16..24bcbd3 100644 --- a/cmake/FindRagel.cmake +++ b/cmake/FindRagel.cmake @@ -1,12 +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_program(RAGEL ragel) +find_program(RAGEL_EXECUTABLE ragel) -if (${RAGEL} STREQUAL "RAGEL-NOTFOUND") +if (${RAGEL_EXECUTABLE} STREQUAL "RAGEL-NOTFOUND") message(FATAL_ERROR "Please install ragel to compile Monicelli.") else() - message(STATUS "Found ragel: ${RAGEL}") + message(STATUS "Found Ragel: ${RAGEL_EXECUTABLE}") endif() function(add_ragel_library name ragel_source) @@ -16,7 +16,7 @@ function(add_ragel_library name ragel_source) add_custom_command( OUTPUT "${generated_source}" MAIN_DEPENDENCY "${ragel_source}" - COMMAND ${RAGEL} -G2 "${CMAKE_CURRENT_SOURCE_DIR}/${ragel_source}" -o "${generated_source}" + COMMAND ${RAGEL_EXECUTABLE} -G2 "${CMAKE_CURRENT_SOURCE_DIR}/${ragel_source}" -o "${generated_source}" WORKING_DIRECTORY "${CMAKE_CURRENT_BINARY_DIR}" VERBATIM ) diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt index 11b9aba..5d61f2f 100644 --- a/src/CMakeLists.txt +++ b/src/CMakeLists.txt @@ -1,7 +1,7 @@ # 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 REQUIRED CONFIG) +find_package(LLVM 6.0 REQUIRED CONFIG) find_package(Ragel REQUIRED) set(MONICELLI_LINKER ON CACHE BOOL "Enable the Monicelli linker. Requires POSIX.")