Commit 6752b1ee authored by Nikola Dinev's avatar Nikola Dinev

Explicitly specify path to clang builtin headers

parent d2f1113c
Pipeline #287376 failed with stages
in 3 minutes and 48 seconds
......@@ -3,7 +3,7 @@
# Defines the variables:
#
# LLVM_FOUND - LLVM was found of the system
# LLVM_VERSION - LLVM version
# LLVM_VERSION - LLVM version (this is also an INTERNAL CACHE variable)
# LLVM_CXXFLAGS - C++ compiler flags for files that include LLVM headers
# LLVM_INCLUDE_DIR - Directory containing LLVM headers
# LLVM_LIB_DIR - Directory containing LLVM libraries
......@@ -23,6 +23,8 @@ if (LLVM_CONFIG)
OUTPUT_VARIABLE LLVM_VERSION
OUTPUT_STRIP_TRAILING_WHITESPACE)
set(LLVM_VERSION ${LLVM_VERSION} CACHE INTERNAL "the LLVM version")
execute_process(
COMMAND ${LLVM_CONFIG} --cxxflags
OUTPUT_VARIABLE LLVM_CXXFLAGS
......
......@@ -50,6 +50,8 @@ if (ELSA_BUILD_PYTHON_BINDINGS)
set(CMAKE_EXPORT_COMPILE_COMMANDS ON)
get_filename_component(CMAKE_CURRENT_LIST_DIR_LAST_PART ${CMAKE_CURRENT_LIST_DIR} NAME)
get_filename_component(LLVM_CONFIG_DIR ${LLVM_CONFIG} DIRECTORY)
file(APPEND ${PROJECT_BINARY_DIR}/elsa/__init__.py "from .${CMAKE_CURRENT_LIST_DIR_LAST_PART} import *\n")
add_custom_command(OUTPUT ${BINDINGS_CODE_PATH}
......@@ -57,6 +59,7 @@ if (ELSA_BUILD_PYTHON_BINDINGS)
${ARGN}
--extra-arg=-I${PYTHON_INCLUDE_DIRS}
--extra-arg=-I${PYBIND11_INCLUDE_DIR}
--extra-arg=-I${LLVM_CONFIG_DIR}/../lib/clang/${LLVM_VERSION}/include
-p=${CMAKE_BINARY_DIR}
--hints=${HINTS_PATH}
-o=${BINDINGS_CODE_PATH}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment