Skip to content
This repository was archived by the owner on Apr 8, 2021. It is now read-only.

Commit e7dbb80

Browse files
haysamandrea-iob
authored andcommitted
cmake: add CBLAS dependency
1 parent ebec67e commit e7dbb80

File tree

4 files changed

+414
-0
lines changed

4 files changed

+414
-0
lines changed

CMakeLists.txt

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -494,6 +494,18 @@ if (${_BLAS_index} GREATER -1)
494494
endif()
495495
unset(_BLAS_index)
496496

497+
list(FIND EXTERNAL_DEPS "CBLAS" _CBLAS_index)
498+
if (${_CBLAS_index} GREATER -1)
499+
list(APPEND CMAKE_MODULE_PATH "${CMAKE_SOURCE_DIR}/external/CBLAS/cmake")
500+
501+
find_package(CBLAS REQUIRED)
502+
503+
list (INSERT BITPIT_EXTERNAL_DEPENDENCIES 0 "CBLAS")
504+
list (INSERT BITPIT_EXTERNAL_LIBRARIES 0 "${CBLAS_LIBRARIES}")
505+
list (INSERT BITPIT_EXTERNAL_INCLUDE_DIRS 0 "${CBLAS_INCLUDE_DIRS}")
506+
endif()
507+
unset(_CBLAS_index)
508+
497509
list(FIND EXTERNAL_DEPS "LAPACK" _LAPACK_index)
498510
if (${_LAPACK_index} GREATER -1)
499511
find_package(LAPACK REQUIRED)

external/CBLAS/CMakeLists.txt

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
# Specify the version being used as well as the language
2+
cmake_minimum_required(VERSION 2.8)
3+
4+
#------------------------------------------------------------------------------------#
5+
# CMake targets
6+
#------------------------------------------------------------------------------------#
7+
add_custom_target(clean-external-cblas COMMAND ${CMAKE_MAKE_PROGRAM} clean WORKING_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR})
8+
9+
install(FILES "cmake/FindCBLAS.cmake" DESTINATION "${CMAKE_INSTALL_PREFIX}/${BITPIT_INSTALL_CMAKE_DIR}")

0 commit comments

Comments
 (0)