Skip to content

Commit

Permalink
Commented out hybrid module stuff
Browse files Browse the repository at this point in the history
  • Loading branch information
DominicDirkx committed Oct 18, 2023
1 parent c51a1b5 commit d866cb6
Showing 1 changed file with 40 additions and 40 deletions.
80 changes: 40 additions & 40 deletions tudatpy/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -171,46 +171,46 @@ INSTALL_PURE_PYTHON_MODULE_DIR(bodies)
INSTALL_PURE_PYTHON_MODULE_DIR(plotting)
INSTALL_PURE_PYTHON_MODULE_DIR(util)
INSTALL_PURE_PYTHON_MODULE_DIR(io)

# Install the Python components of kernel modules
macro(INSTALL_PYTHON_COMPONENTS_OF_HYBRID_MODULE module_dir_name)
install(DIRECTORY kernel_hybrid/${module_dir_name}/ DESTINATION "${TUDATPY_INSTALL_PATH}/${module_dir_name}")
file(COPY kernel_hybrid/${module_dir_name}/ DESTINATION ${CMAKE_CURRENT_BINARY_DIR}/${module_dir_name}/)
endmacro()
# INSTALL_PYTHON_COMPONENTS_OF_HYBRID_MODULE(utils)
#INSTALL_PYTHON_COMPONENTS_OF_HYBRID_MODULE(astro)
INSTALL_PYTHON_COMPONENTS_OF_HYBRID_MODULE(trajectory_design)
#INSTALL_PYTHON_COMPONENTS_OF_HYBRID_MODULE(constants)
#INSTALL_PYTHON_COMPONENTS_OF_HYBRID_MODULE(interface)
# INSTALL_PYTHON_COMPONENTS_OF_HYBRID_MODULE(io)
#INSTALL_PYTHON_COMPONENTS_OF_HYBRID_MODULE(math)
#INSTALL_PYTHON_COMPONENTS_OF_HYBRID_MODULE(numerical_simulation)

# Expose hybrid C++/Python modules
file(COPY ${CMAKE_CURRENT_LIST_DIR}/setup_hybrid_modules.py DESTINATION ${CMAKE_CURRENT_BINARY_DIR}/../)
macro(EXPOSE_HYBRID_MODULES)
foreach(module ${ARGN})
# Might be more robust to use a combination of
# - add_custom_command
# - add_custom_target
# - add_dependencies
# See: https://stackoverflow.com/a/44225986
add_custom_command(TARGET kernel POST_BUILD
COMMAND ${PYTHON_EXECUTABLE} setup_hybrid_modules.py ${module}
WORKING_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}/../
DEPENDS ${CMAKE_CURRENT_BINARY_DIR}/kernel.so)
endforeach()
endmacro()
EXPOSE_HYBRID_MODULES(
# utils
astro
trajectory_design
constants
interface
# io
math
numerical_simulation
)
#
## Install the Python components of kernel modules
#macro(INSTALL_PYTHON_COMPONENTS_OF_HYBRID_MODULE module_dir_name)
# install(DIRECTORY kernel_hybrid/${module_dir_name}/ DESTINATION "${TUDATPY_INSTALL_PATH}/${module_dir_name}")
# file(COPY kernel_hybrid/${module_dir_name}/ DESTINATION ${CMAKE_CURRENT_BINARY_DIR}/${module_dir_name}/)
#endmacro()
## INSTALL_PYTHON_COMPONENTS_OF_HYBRID_MODULE(utils)
##INSTALL_PYTHON_COMPONENTS_OF_HYBRID_MODULE(astro)
#INSTALL_PYTHON_COMPONENTS_OF_HYBRID_MODULE(trajectory_design)
##INSTALL_PYTHON_COMPONENTS_OF_HYBRID_MODULE(constants)
##INSTALL_PYTHON_COMPONENTS_OF_HYBRID_MODULE(interface)
## INSTALL_PYTHON_COMPONENTS_OF_HYBRID_MODULE(io)
##INSTALL_PYTHON_COMPONENTS_OF_HYBRID_MODULE(math)
##INSTALL_PYTHON_COMPONENTS_OF_HYBRID_MODULE(numerical_simulation)
#
## Expose hybrid C++/Python modules
#file(COPY ${CMAKE_CURRENT_LIST_DIR}/setup_hybrid_modules.py DESTINATION ${CMAKE_CURRENT_BINARY_DIR}/../)
#macro(EXPOSE_HYBRID_MODULES)
# foreach(module ${ARGN})
# # Might be more robust to use a combination of
# # - add_custom_command
# # - add_custom_target
# # - add_dependencies
# # See: https://stackoverflow.com/a/44225986
# add_custom_command(TARGET kernel POST_BUILD
# COMMAND ${PYTHON_EXECUTABLE} setup_hybrid_modules.py ${module}
# WORKING_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}/../
# DEPENDS ${CMAKE_CURRENT_BINARY_DIR}/kernel.so)
# endforeach()
#endmacro()
#EXPOSE_HYBRID_MODULES(
# # utils
# astro
# trajectory_design
# constants
# interface
# # io
# math
# numerical_simulation
#)

#install(FILES test.py "${CMAKE_CURRENT_BINARY_DIR}/_version.py")
file(COPY ../tests DESTINATION ${CMAKE_CURRENT_BINARY_DIR}/../)
Expand Down

0 comments on commit d866cb6

Please sign in to comment.