Skip to content

Commit

Permalink
pybamm-team#633 pybind11 find the python version
Browse files Browse the repository at this point in the history
  • Loading branch information
Scottmar93 committed Oct 24, 2019
1 parent 08e5247 commit b5ca60a
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 37 deletions.
37 changes: 1 addition & 36 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -21,43 +21,8 @@ TARGET_LINK_LIBRARIES(klu PRIVATE ${SUNMATSPARSE} ${IDA} ${NVECTOR} ${SUNKLU})
find_library(RT rt)
TARGET_LINK_LIBRARIES(klu PRIVATE ${RT})

## KLU ------
## Add the includes
# set(KLU_INCLUDE_DIR "SuiteSparse/KLU/Include")
# set(AMD_INCLUDE_DIR "SuiteSparse/AMD/Include")
# set(COLAMD_INCLUDE_DIR "SuiteSparse/COLAMD/Include")
# set(BTF_INCLUDE_DIR "SuiteSparse/BTF/Include")
# set(SUITESPARSECONFIG_INCLUDE_DIR "SuiteSparse/SuiteSparse_config")
# TARGET_INCLUDE_DIRECTORIES(klu PRIVATE
# ${AMD_INCLUDE_DIR}
# ${COLAMD_INCLUDE_DIR}
# ${BTF_INCLUDE_DIR}
# ${SUITESPARSECONFIG_INCLUDE_DIR}
# ${KLU_INCLUDE_DIR}
# )

# set(SUITESPARSE_INCLUDE_DIR "/usr/include/suitesparse")
# find_path(SUITESPARSE_INCLUDE_DIR suitesparse)
# INCLUDE_DIRECTORIES(${SUITESPARSE_INCLUDE_DIR})

# link suitesparse
set(CMAKE_MODULE_PATH ${CMAKE_MODULE_PATH} ${PROJECT_SOURCE_DIR})
find_package(SuiteSparse)
include_directories(${SuiteSparse_INCLUDE_DIRS})
target_link_libraries(klu PRIVATE ${SuiteSparse_LIBRARIES})

# ## Link Libraries
# find_library(KLU klu)
# find_library(AMD amd)
# find_library(COLAMD colamd)
# find_library(BTF btf)
# find_library(SUITESPARSE_CONFIG suitesparseconfig)
# TARGET_LINK_LIBRARIES(klu PRIVATE
# ${KLU}
# ${AMD}
# ${COLAMD}
# ${BTF}
# ${SUITESPARSE_CONFIG}
# )

# ---------------

4 changes: 3 additions & 1 deletion scripts/install_sundials_4.1.0.sh
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,9 @@ git clone https://github.com/pybind/pybind11.git

cd $CURRENT_DIR
pip install pybind11 # also do a pip install for good measure
cmake .

PY_VERSION=PY_VER=$(python --version 2>&1 | awk '{print $2}')
cmake -DPYBIND11_PYTHON_VERSION=${PY_VERSION} .
make clean
make

Expand Down

0 comments on commit b5ca60a

Please sign in to comment.