Skip to content

Commit

Permalink
Merge pull request #43 from SylvainCorlay/cling-library-dir
Browse files Browse the repository at this point in the history
Setup cling library dir for blas upon installation
  • Loading branch information
wolfv committed Nov 17, 2017
2 parents 363a592 + 6209e3a commit 19caa5e
Show file tree
Hide file tree
Showing 3 changed files with 20 additions and 0 deletions.
3 changes: 3 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -47,3 +47,6 @@ docs/build/

# Jupyter artefacts
.ipynb_checkpoints/

# Generated header
include/xtensor-blas/xblas_config.hpp
13 changes: 13 additions & 0 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,19 @@ set(INCLUDE_DIR ${CMAKE_CURRENT_SOURCE_DIR}/include)
set(FLENS_INCLUDE_DIR ${CMAKE_CURRENT_SOURCE_DIR}/include/xtensor-blas/flens)
set(XTENSOR_BLAS_INCLUDE_DIR ${INCLUDE_DIR} ${FLENS_INCLUDE_DIR})

# Configuration
# =============

# TODO: use the library directory of the found BLAS implementation instead of CMAKE_INSTALL_LIBDIR
set(XTENSOR_BLAS_CLING_LIBRARY_DIR_64 "\"${CMAKE_INSTALL_PREFIX}/lib64\"")
set(XTENSOR_BLAS_CLING_LIBRARY_DIR_32 "\"${CMAKE_INSTALL_PREFIX}/lib32\"")
set(XTENSOR_BLAS_CLING_LIBRARY_DIR "\"${CMAKE_INSTALL_PREFIX}/lib\"")

configure_file (
"${INCLUDE_DIR}/xtensor-blas/xblas_config.hpp.in"
"${INCLUDE_DIR}/xtensor-blas/xblas_config.hpp"
)

# Versionning
# ===========

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,10 @@
#define BLAS_IDX int
#endif

#pragma cling add_library_path(@XTENSOR_BLAS_CLING_LIBRARY_DIR_64@)
#pragma cling add_library_path(@XTENSOR_BLAS_CLING_LIBRARY_DIR_32@)
#pragma cling add_library_path(@XTENSOR_BLAS_CLING_LIBRARY_DIR@)

#pragma cling load("libblas")
#pragma cling load("liblapack")

Expand Down

0 comments on commit 19caa5e

Please sign in to comment.