Skip to content

Commit

Permalink
Merge pull request #64 from Chaste/release-2024.1
Browse files Browse the repository at this point in the history
Fix PyChaste Build for Chaste 2024.1
  • Loading branch information
kwabenantim committed Apr 15, 2024
2 parents dae151b + b8fbacc commit 0be20da
Show file tree
Hide file tree
Showing 138 changed files with 10,916 additions and 1,447 deletions.
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -19,3 +19,5 @@ src/python/dist*
src/python/chaste.egg-info*
# No api docs
doc/api/build*
# Build folder
build/
1 change: 0 additions & 1 deletion ProjectIncludes.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,6 @@
set(PYCHASTE_INCLUDE_DIRS ${CMAKE_CURRENT_SOURCE_DIR}/src/)
list (APPEND PYCHASTE_INCLUDE_DIRS ${CMAKE_CURRENT_SOURCE_DIR}/src/cell_based)
list (APPEND PYCHASTE_INCLUDE_DIRS ${CMAKE_CURRENT_SOURCE_DIR}/src/ode)
list (APPEND PYCHASTE_INCLUDE_DIRS ${CMAKE_CURRENT_SOURCE_DIR}/src/mesh)
list (APPEND PYCHASTE_INCLUDE_DIRS ${CMAKE_CURRENT_SOURCE_DIR}/src/tutorial)
list (APPEND PYCHASTE_INCLUDE_DIRS ${CMAKE_CURRENT_SOURCE_DIR}/src/visualization)
list (APPEND PYCHASTE_INCLUDE_DIRS ${CMAKE_CURRENT_SOURCE_DIR}/dynamic)
19 changes: 8 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
set(CASTXML_EXE_LOC "/usr/bin/castxml" CACHE FILEPATH "Path to the castxml executable.")

# 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,14 @@ 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}
--std c++17
)

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

0 comments on commit 0be20da

Please sign in to comment.