From 1bdb2d64c929cb1fcefcb6d57d62130ce16911c5 Mon Sep 17 00:00:00 2001 From: Stefano Sanfilippo Date: Mon, 9 Dec 2019 18:44:36 +0100 Subject: [PATCH] Build system fixes. --- CMakeLists.txt | 2 +- cmake/FindRagel.cmake | 2 +- src/CMakeLists.txt | 4 ++++ 3 files changed, 6 insertions(+), 2 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index d056c7a..f9efdf0 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -15,7 +15,7 @@ include(Doxycelli) if (MSVC) add_compile_options(/W4 /WX) else() - add_compile_options(-Wall -Wextra -pedantic -Werror) + add_compile_options(-Wall -Wextra -pedantic -Werror -Wno-unused-parameter) endif() add_subdirectory(src) diff --git a/cmake/FindRagel.cmake b/cmake/FindRagel.cmake index 52c7501..9b41b14 100644 --- a/cmake/FindRagel.cmake +++ b/cmake/FindRagel.cmake @@ -3,7 +3,7 @@ find_program(RAGEL_EXECUTABLE ragel) -if (${RAGEL_EXECUTABLE} STREQUAL "RAGEL-NOTFOUND") +if (${RAGEL_EXECUTABLE} STREQUAL "RAGEL_EXECUTABLE-NOTFOUND") message(FATAL_ERROR "Please install ragel to compile Monicelli.") else() message(STATUS "Found Ragel: ${RAGEL_EXECUTABLE}") diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt index 9d6fdce..12b2104 100644 --- a/src/CMakeLists.txt +++ b/src/CMakeLists.txt @@ -39,6 +39,10 @@ set_target_properties(mcc lexer CXX_STANDARD_REQUIRED true ) +target_include_directories(mcc PRIVATE ${LLVM_INCLUDE_DIRS}) + +target_compile_definitions(mcc PRIVATE ${LLVM_DEFINITIONS}) + target_link_libraries(mcc PRIVATE lexer) llvm_config(mcc