Skip to content

Commit

Permalink
#62 update cppwg cmake target
Browse files Browse the repository at this point in the history
  • Loading branch information
kwabenantim committed Mar 23, 2024
1 parent 3fe4c00 commit c1ac439
Showing 1 changed file with 7 additions and 11 deletions.
18 changes: 7 additions & 11 deletions WrapPython.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -35,9 +35,6 @@ add_compile_options(-Wno-unused-local-typedefs)
# Add any cmake modules defined in this project
list(APPEND CMAKE_MODULE_PATH ${CMAKE_CURRENT_SOURCE_DIR} PARENT_SCOPE)

# Used for binding generation
find_program(CASTXML_EXE_LOC castxml)

# Find the Chaste and third party dependency header files.
include_directories(${Chaste_INCLUDE_DIRS} ${Chaste_THIRD_PARTY_INCLUDE_DIRS})

Expand Down Expand Up @@ -102,14 +99,13 @@ file(COPY ${CMAKE_CURRENT_SOURCE_DIR}/doc/ DESTINATION ${CMAKE_CURRENT_BINARY_DI

# Target to generate bindings
add_custom_target(project_PyChaste_Python_Bindings)
SET(arguments ${CMAKE_SOURCE_DIR}/)
LIST(APPEND arguments ${CMAKE_CURRENT_SOURCE_DIR}/dynamic/wrappers/)
LIST(APPEND arguments ${CMAKE_CURRENT_SOURCE_DIR}/dynamic/wrapper_generators/package_info.yaml)
LIST(APPEND arguments ${CASTXML_EXE_LOC})
LIST(APPEND arguments ${PYCHASTE_INCLUDE_DIRS})
LIST(APPEND arguments ${Chaste_INCLUDE_DIRS})
LIST(APPEND arguments ${Chaste_THIRD_PARTY_INCLUDE_DIRS})
add_custom_command(TARGET project_PyChaste_Python_Bindings COMMAND python3 ${CMAKE_CURRENT_SOURCE_DIR}/dynamic/wrapper_generators/generate.py ${arguments})
add_custom_command(
TARGET project_PyChaste_Python_Bindings
COMMAND cppwg ${CMAKE_SOURCE_DIR}
-w ${CMAKE_CURRENT_SOURCE_DIR}/dynamic/wrappers
-p ${CMAKE_CURRENT_SOURCE_DIR}/dynamic/wrapper_generators/package_info.yaml
-i ${PYCHASTE_INCLUDE_DIRS} ${Chaste_INCLUDE_DIRS} ${Chaste_THIRD_PARTY_INCLUDE_DIRS}
)

# Loop through each module and create the shared library targets
list(LENGTH PYCHASTE_PYTHON_MODULES len1)
Expand Down

0 comments on commit c1ac439

Please sign in to comment.