11.08., 9:00 - 11:00: Due to updates GitLab will be unavailable for some minutes between 09:00 and 11:00.

Commit d2f1113c authored by Nikola Dinev's avatar Nikola Dinev

Export compile commands JSON for modules with a python interface

parent f40099fb
Pipeline #285491 passed with stages
in 20 minutes and 31 seconds
......@@ -44,6 +44,10 @@ if (ELSA_BUILD_PYTHON_BINDINGS)
# you can omit a source file from the list to prevent the generation of bindings for that file
macro(GENERATE_BINDINGS TARGET_NAME BINDINGS_CODE_PATH HINTS_PATH)
if ((TARGET pyelsa) AND (TARGET pybind11_generator))
# generate a compile commands file
# ensures the same compilation flags are passed to clang when compiling the file
# as a component of elsa and when parsing it for bindings generation
set(CMAKE_EXPORT_COMPILE_COMMANDS ON)
get_filename_component(CMAKE_CURRENT_LIST_DIR_LAST_PART ${CMAKE_CURRENT_LIST_DIR} NAME)
file(APPEND ${PROJECT_BINARY_DIR}/elsa/__init__.py "from .${CMAKE_CURRENT_LIST_DIR_LAST_PART} import *\n")
......
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