Browse Source

academic/cblas: Updated for version 3.8.0.

Signed-off-by: Kyle Guinn <elyk03@gmail.com>
pull/47/head
Kyle Guinn 8 years ago
committed by Willy Sudiarto Raharjo
parent
commit
53e9010822
  1. 3
      academic/cblas/README
  2. 34
      academic/cblas/cblas.SlackBuild
  3. 6
      academic/cblas/cblas.info
  4. 84
      academic/cblas/patches/cmake-piecewise.diff

3
academic/cblas/README

@ -4,3 +4,6 @@ BLAS library. The interface can be consulted by opening /usr/include/cblas.h
This package is intended for use with the Netlib reference BLAS. It should This package is intended for use with the Netlib reference BLAS. It should
also work with other BLAS implementations that do not already provide a CBLAS also work with other BLAS implementations that do not already provide a CBLAS
implementation. implementation.
To build a static library in addition to the shared library,
pass STATIC=yes to the script.

34
academic/cblas/cblas.SlackBuild

@ -24,7 +24,7 @@
PRGNAM=cblas PRGNAM=cblas
SRCNAM=lapack SRCNAM=lapack
VERSION=${VERSION:-3.7.1}
VERSION=${VERSION:-3.8.0}
BUILD=${BUILD:-1} BUILD=${BUILD:-1}
TAG=${TAG:-_SBo} TAG=${TAG:-_SBo}
@ -92,21 +92,23 @@ cd ..
# cmake doesn't appear to let us build both shared and static libs # cmake doesn't appear to let us build both shared and static libs
# at the same time, so build it twice. This may build a non-PIC library # at the same time, so build it twice. This may build a non-PIC library
# on some architectures, which should be faster. # on some architectures, which should be faster.
mkdir -p static
cd static
cmake \
-DCMAKE_C_FLAGS:STRING="$SLKCFLAGS" \
-DCMAKE_Fortran_FLAGS:STRING="$SLKCFLAGS" \
-DCMAKE_INSTALL_PREFIX=/usr \
-DCMAKE_BUILD_TYPE=None \
-DCMAKE_RULE_MESSAGES=OFF \
-DCMAKE_VERBOSE_MAKEFILE=TRUE \
-DUSE_OPTIMIZED_BLAS=ON \
-DBUILD_CBLAS=ON \
..
make
make install/strip DESTDIR=$PKG
cd ..
if [ "${STATIC:-no}" != "no" ]; then
mkdir -p static
cd static
cmake \
-DCMAKE_C_FLAGS:STRING="$SLKCFLAGS" \
-DCMAKE_Fortran_FLAGS:STRING="$SLKCFLAGS" \
-DCMAKE_INSTALL_PREFIX=/usr \
-DCMAKE_BUILD_TYPE=None \
-DCMAKE_RULE_MESSAGES=OFF \
-DCMAKE_VERBOSE_MAKEFILE=TRUE \
-DUSE_OPTIMIZED_BLAS=ON \
-DBUILD_CBLAS=ON \
..
make
make install/strip DESTDIR=$PKG
cd ..
fi
mkdir -p $PKG/usr/doc/$PRGNAM-$VERSION mkdir -p $PKG/usr/doc/$PRGNAM-$VERSION
cp -a $DOCS $PKG/usr/doc/$PRGNAM-$VERSION cp -a $DOCS $PKG/usr/doc/$PRGNAM-$VERSION

6
academic/cblas/cblas.info

@ -1,8 +1,8 @@
PRGNAM="cblas" PRGNAM="cblas"
VERSION="3.7.1"
VERSION="3.8.0"
HOMEPAGE="http://www.netlib.org/blas/" HOMEPAGE="http://www.netlib.org/blas/"
DOWNLOAD="https://github.com/Reference-LAPACK/lapack/archive/v3.7.1/lapack-3.7.1.tar.gz"
MD5SUM="9cd679ab1fd325ca964de70adcd33441"
DOWNLOAD="https://github.com/Reference-LAPACK/lapack/archive/v3.8.0/lapack-3.8.0.tar.gz"
MD5SUM="96591affdbf58c450d45c1daa540dbd2"
DOWNLOAD_x86_64="" DOWNLOAD_x86_64=""
MD5SUM_x86_64="" MD5SUM_x86_64=""
REQUIRES="blas" REQUIRES="blas"

84
academic/cblas/patches/cmake-piecewise.diff

@ -92,7 +92,7 @@ deleted file mode 100644
-get_filename_component(_CBLAS_PREFIX "${_CBLAS_PREFIX}" PATH) -get_filename_component(_CBLAS_PREFIX "${_CBLAS_PREFIX}" PATH)
- -
-# Load the LAPACK package with which we were built. -# Load the LAPACK package with which we were built.
-set(LAPACK_DIR "${_CBLAS_PREFIX}/@{LIBRARY_DIR@/cmake/lapack-@LAPACK_VERSION@")
-set(LAPACK_DIR "${_CBLAS_PREFIX}/@CMAKE_INSTALL_LIBDIR@/cmake/lapack-@LAPACK_VERSION@")
-find_package(LAPACK NO_MODULE) -find_package(LAPACK NO_MODULE)
- -
-# Load lapacke targets from the install tree. -# Load lapacke targets from the install tree.
@ -121,6 +121,19 @@ deleted file mode 100644
- endif() - endif()
-endif() -endif()
- -
diff --git a/CBLAS/src/CMakeLists.txt b/CBLAS/src/CMakeLists.txt
--- a/CBLAS/src/CMakeLists.txt
+++ b/CBLAS/src/CMakeLists.txt
@@ -120,9 +120,5 @@
VERSION ${LAPACK_VERSION}
SOVERSION ${LAPACK_MAJOR_VERSION}
)
-target_include_directories(cblas PUBLIC
- $<BUILD_INTERFACE:${CMAKE_CURRENT_SOURCE_DIR}/../include>
- $<INSTALL_INTERFACE:include>
-)
target_link_libraries(cblas PRIVATE ${BLAS_LIBRARIES})
lapack_install_library(cblas)
diff --git a/CMAKE/lapack-config-build.cmake.in b/CMAKE/lapack-config-build.cmake.in diff --git a/CMAKE/lapack-config-build.cmake.in b/CMAKE/lapack-config-build.cmake.in
deleted file mode 100644 deleted file mode 100644
--- a/CMAKE/lapack-config-build.cmake.in --- a/CMAKE/lapack-config-build.cmake.in
@ -159,23 +172,7 @@ deleted file mode 100644
diff --git a/CMakeLists.txt b/CMakeLists.txt diff --git a/CMakeLists.txt b/CMakeLists.txt
--- a/CMakeLists.txt --- a/CMakeLists.txt
+++ b/CMakeLists.txt +++ b/CMakeLists.txt
@@ -8,6 +8,15 @@
set_property(CACHE CMAKE_BUILD_TYPE PROPERTY STRINGS "Debug" "Release" "MinSizeRel" "RelWithDebInfo" "Coverage")
endif()
+string(TOUPPER ${CMAKE_BUILD_TYPE} CMAKE_BUILD_TYPE_UPPER)
+if(${CMAKE_BUILD_TYPE_UPPER} STREQUAL "COVERAGE")
+ message(STATUS "Adding coverage")
+ find_package(codecov)
+endif()
+
+# By default static library
+option(BUILD_SHARED_LIBS "Build shared libraries" OFF)
+
project(LAPACK Fortran C)
set(LAPACK_MAJOR_VERSION 3)
@@ -96,11 +105,8 @@
@@ -106,11 +106,8 @@
endif() endif()
# -------------------------------------------------- # --------------------------------------------------
@ -187,30 +184,10 @@ diff --git a/CMakeLists.txt b/CMakeLists.txt
ARCHIVE DESTINATION ${CMAKE_INSTALL_LIBDIR} ARCHIVE DESTINATION ${CMAKE_INSTALL_LIBDIR}
LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR} LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR}
RUNTIME DESTINATION ${CMAKE_INSTALL_BINDIR} RUNTIME DESTINATION ${CMAKE_INSTALL_BINDIR}
@@ -111,10 +117,12 @@
# --------------------------------------------------
# Testing
-
+option(BUILD_TESTING "Build tests" OFF)
enable_testing()
include(CTest)
enable_testing()
+message(STATUS "Build tests: ${BUILD_TESTING}")
+
# --------------------------------------------------
# Organize output files. On Windows this also keeps .dll files next
@@ -128,33 +136,6 @@
@@ -139,21 +136,6 @@
include(CheckLAPACKCompilerFlags) include(CheckLAPACKCompilerFlags)
CheckLAPACKCompilerFlags() CheckLAPACKCompilerFlags()
-string(TOUPPER ${CMAKE_BUILD_TYPE} CMAKE_BUILD_TYPE_UPPER)
-if(${CMAKE_BUILD_TYPE_UPPER} STREQUAL "COVERAGE")
- message(STATUS "Adding coverage")
- find_package(codecov)
-endif()
-
-# -------------------------------------------------- -# --------------------------------------------------
-# Check second function -# Check second function
- -
@ -225,17 +202,11 @@ diff --git a/CMakeLists.txt b/CMakeLists.txt
- -
-set(SECOND_SRC ${LAPACK_SOURCE_DIR}/INSTALL/second_${TIME_FUNC}.f) -set(SECOND_SRC ${LAPACK_SOURCE_DIR}/INSTALL/second_${TIME_FUNC}.f)
-set(DSECOND_SRC ${LAPACK_SOURCE_DIR}/INSTALL/dsecnd_${TIME_FUNC}.f) -set(DSECOND_SRC ${LAPACK_SOURCE_DIR}/INSTALL/dsecnd_${TIME_FUNC}.f)
-
-# By default static library
-option(BUILD_SHARED_LIBS "Build shared libraries" OFF)
-
-option(BUILD_TESTING "Build tests" OFF)
-message(STATUS "Build tests: ${BUILD_TESTING}")
- -
# deprecated LAPACK and LAPACKE routines # deprecated LAPACK and LAPACKE routines
option(BUILD_DEPRECATED "Build deprecated routines" OFF) option(BUILD_DEPRECATED "Build deprecated routines" OFF)
message(STATUS "Build deprecated routines: ${BUILD_DEPRECATED}") message(STATUS "Build deprecated routines: ${BUILD_DEPRECATED}")
@@ -178,8 +159,9 @@
@@ -177,8 +159,9 @@
endif() endif()
# -------------------------------------------------- # --------------------------------------------------
@ -246,7 +217,7 @@ diff --git a/CMakeLists.txt b/CMakeLists.txt
# Check the usage of the user provided BLAS libraries # Check the usage of the user provided BLAS libraries
if(BLAS_LIBRARIES) if(BLAS_LIBRARIES)
@@ -190,213 +172,117 @@
@@ -189,213 +172,117 @@
if(BLAS_FOUND) if(BLAS_FOUND)
message(STATUS "--> BLAS supplied by user is WORKING, will use ${BLAS_LIBRARIES}.") message(STATUS "--> BLAS supplied by user is WORKING, will use ${BLAS_LIBRARIES}.")
else() else()
@ -443,7 +414,7 @@ diff --git a/CMakeLists.txt b/CMakeLists.txt
-if(NOT BLAS_FOUND) -if(NOT BLAS_FOUND)
- set(ALL_TARGETS ${ALL_TARGETS} blas) - set(ALL_TARGETS ${ALL_TARGETS} blas)
-endif() -endif()
-
-if(NOT LATESTLAPACK_FOUND) -if(NOT LATESTLAPACK_FOUND)
- set(ALL_TARGETS ${ALL_TARGETS} lapack) - set(ALL_TARGETS ${ALL_TARGETS} lapack)
-endif() -endif()
@ -458,7 +429,7 @@ diff --git a/CMakeLists.txt b/CMakeLists.txt
-if(ALL_TARGETS) -if(ALL_TARGETS)
- install(EXPORT lapack-targets - install(EXPORT lapack-targets
- DESTINATION ${CMAKE_INSTALL_LIBDIR}/cmake/lapack-${LAPACK_VERSION}) - DESTINATION ${CMAKE_INSTALL_LIBDIR}/cmake/lapack-${LAPACK_VERSION})
-
- # Choose one of the lapack targets to use as a guard for - # Choose one of the lapack targets to use as a guard for
- # lapack-config.cmake to load targets from the install tree. - # lapack-config.cmake to load targets from the install tree.
- list(GET ALL_TARGETS 0 _lapack_config_install_guard_target) - list(GET ALL_TARGETS 0 _lapack_config_install_guard_target)
@ -527,7 +498,18 @@ diff --git a/LAPACKE/CMakeLists.txt b/LAPACKE/CMakeLists.txt
# Create a header file lapacke_mangling.h for the routines called in my C programs # Create a header file lapacke_mangling.h for the routines called in my C programs
include(FortranCInterface) include(FortranCInterface)
## Ensure that the fortran compiler and c compiler specified are compatible ## Ensure that the fortran compiler and c compiler specified are compatible
@@ -79,19 +77,3 @@
@@ -60,10 +58,6 @@
VERSION ${LAPACK_VERSION}
SOVERSION ${LAPACK_MAJOR_VERSION}
)
-target_include_directories(lapacke PUBLIC
- $<BUILD_INTERFACE:${CMAKE_CURRENT_SOURCE_DIR}/../include>
- $<INSTALL_INTERFACE:include>
-)
if(LAPACKE_WITH_TMG)
target_link_libraries(lapacke PRIVATE tmglib)
@@ -83,19 +77,3 @@
${CMAKE_CURRENT_BINARY_DIR}/lapacke.pc ${CMAKE_CURRENT_BINARY_DIR}/lapacke.pc
DESTINATION ${PKG_CONFIG_DIR} DESTINATION ${PKG_CONFIG_DIR}
) )
@ -578,7 +560,7 @@ deleted file mode 100644
-get_filename_component(_LAPACKE_PREFIX "${_LAPACKE_PREFIX}" PATH) -get_filename_component(_LAPACKE_PREFIX "${_LAPACKE_PREFIX}" PATH)
- -
-# Load the LAPACK package with which we were built. -# Load the LAPACK package with which we were built.
-set(LAPACK_DIR "${_LAPACKE_PREFIX}/@{LIBRARY_DIR@/cmake/lapack-@LAPACK_VERSION@")
-set(LAPACK_DIR "${_LAPACKE_PREFIX}/@CMAKE_INSTALL_LIBDIR@/cmake/lapack-@LAPACK_VERSION@")
-find_package(LAPACK NO_MODULE) -find_package(LAPACK NO_MODULE)
- -
-# Load lapacke targets from the install tree. -# Load lapacke targets from the install tree.

Loading…
Cancel
Save