Skip to content

Commit

Permalink
Fix how solver files are copied. (#1053)
Browse files Browse the repository at this point in the history
  • Loading branch information
1uc authored Aug 31, 2023
1 parent a662a45 commit 8079c5e
Showing 1 changed file with 8 additions and 12 deletions.
20 changes: 8 additions & 12 deletions src/solver/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,22 +1,18 @@
# =============================================================================
# Solver sources
# =============================================================================
set(NEWTON_SOLVER_SOURCE_FILES ${CMAKE_CURRENT_SOURCE_DIR}/newton/newton.hpp)
set(CROUT_SOLVER_SOURCE_FILES ${CMAKE_CURRENT_SOURCE_DIR}/crout/crout.hpp)

# =============================================================================
# Copy necessary files to build directory
# =============================================================================
# Newton
file(GLOB NMODL_NEWTON_SOLVER_HEADER_FILES "${CMAKE_CURRENT_SOURCE_DIR}/newton/*.h*")
file(COPY ${NMODL_NEWTON_SOLVER_HEADER_FILES} DESTINATION ${CMAKE_BINARY_DIR}/include/newton/)
# Crout
file(GLOB NMODL_CROUT_SOLVER_HEADER_FILES "${CMAKE_CURRENT_SOURCE_DIR}/crout/*.h*")
file(COPY ${NMODL_CROUT_SOLVER_HEADER_FILES} DESTINATION ${CMAKE_BINARY_DIR}/include/crout/)

cpp_cc_build_time_copy(INPUT "${CMAKE_CURRENT_SOURCE_DIR}/newton/newton.hpp" OUTPUT
"${CMAKE_BINARY_DIR}/include/newton/newton.hpp")

cpp_cc_build_time_copy(INPUT "${CMAKE_CURRENT_SOURCE_DIR}/crout/crout.hpp" OUTPUT
"${CMAKE_BINARY_DIR}/include/crout/crout.hpp")

# Eigen
file(COPY ${NMODL_PROJECT_SOURCE_DIR}/ext/eigen/Eigen DESTINATION ${CMAKE_BINARY_DIR}/include/)

# =============================================================================
# Install solver headers and eigen from include
# =============================================================================

install(DIRECTORY ${CMAKE_BINARY_DIR}/include/ DESTINATION ${NMODL_INSTALL_DIR_SUFFIX}include)

0 comments on commit 8079c5e

Please sign in to comment.