Check LLVM version, rename RAGEL to RAGEL_EXECUTABLE.
This commit is contained in:
parent
08368b178c
commit
25110521d0
|
@ -1,12 +1,12 @@
|
||||||
# Copyright 2017 the Monicelli project authors. All rights reserved.
|
# Copyright 2017 the Monicelli project authors. All rights reserved.
|
||||||
# Use of this source code is governed by a GPLv3 license, see LICENSE.txt.
|
# 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.")
|
message(FATAL_ERROR "Please install ragel to compile Monicelli.")
|
||||||
else()
|
else()
|
||||||
message(STATUS "Found ragel: ${RAGEL}")
|
message(STATUS "Found Ragel: ${RAGEL_EXECUTABLE}")
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
function(add_ragel_library name ragel_source)
|
function(add_ragel_library name ragel_source)
|
||||||
|
@ -16,7 +16,7 @@ function(add_ragel_library name ragel_source)
|
||||||
add_custom_command(
|
add_custom_command(
|
||||||
OUTPUT "${generated_source}"
|
OUTPUT "${generated_source}"
|
||||||
MAIN_DEPENDENCY "${ragel_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}"
|
WORKING_DIRECTORY "${CMAKE_CURRENT_BINARY_DIR}"
|
||||||
VERBATIM
|
VERBATIM
|
||||||
)
|
)
|
||||||
|
|
|
@ -1,7 +1,7 @@
|
||||||
# Copyright 2017 the Monicelli project authors. All rights reserved.
|
# Copyright 2017 the Monicelli project authors. All rights reserved.
|
||||||
# Use of this source code is governed by a GPLv3 license, see LICENSE.txt.
|
# 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)
|
find_package(Ragel REQUIRED)
|
||||||
|
|
||||||
set(MONICELLI_LINKER ON CACHE BOOL "Enable the Monicelli linker. Requires POSIX.")
|
set(MONICELLI_LINKER ON CACHE BOOL "Enable the Monicelli linker. Requires POSIX.")
|
||||||
|
|
Reference in New Issue
Block a user