summaryrefslogtreecommitdiff
path: root/academic/cblas/patches/cmake-piecewise.diff
diff options
context:
space:
mode:
Diffstat (limited to 'academic/cblas/patches/cmake-piecewise.diff')
-rw-r--r--academic/cblas/patches/cmake-piecewise.diff344
1 files changed, 169 insertions, 175 deletions
diff --git a/academic/cblas/patches/cmake-piecewise.diff b/academic/cblas/patches/cmake-piecewise.diff
index 1dc85494a7..e5fd1d9c6c 100644
--- a/academic/cblas/patches/cmake-piecewise.diff
+++ b/academic/cblas/patches/cmake-piecewise.diff
@@ -9,21 +9,21 @@ diff --git a/CBLAS/CMakeLists.txt b/CBLAS/CMakeLists.txt
-
# Create a header file cblas.h for the routines called in my C programs
include(FortranCInterface)
- FortranCInterface_HEADER( ${CMAKE_CURRENT_SOURCE_DIR}/include/cblas_mangling.h
-@@ -40,51 +38,8 @@
- add_subdirectory(examples)
- endif(BUILD_TESTING)
+ ## Ensure that the fortran compiler and c compiler specified are compatible
+@@ -36,50 +34,8 @@
+ add_subdirectory(examples)
+ endif()
-if(NOT BLAS_FOUND)
- set(ALL_TARGETS ${ALL_TARGETS} blas)
--endif(NOT BLAS_FOUND)
+-endif()
-
-# Export cblas targets from the
-# install tree, if any.
-set(_cblas_config_install_guard_target "")
-if(ALL_TARGETS)
- install(EXPORT cblas-targets
-- DESTINATION lib/cmake/cblas-${LAPACK_VERSION})
+- DESTINATION ${CMAKE_INSTALL_LIBDIR}/cmake/cblas-${LAPACK_VERSION})
- # Choose one of the cblas targets to use as a guard for
- # cblas-config.cmake to load targets from the install tree.
- list(GET ALL_TARGETS 0 _cblas_config_install_guard_target)
@@ -49,19 +49,18 @@ diff --git a/CBLAS/CMakeLists.txt b/CBLAS/CMakeLists.txt
install(FILES
${CMAKE_CURRENT_BINARY_DIR}/cblas.pc
DESTINATION ${PKG_CONFIG_DIR}
- )
+ )
-
-configure_file(${CMAKE_CURRENT_SOURCE_DIR}/cmake/cblas-config-install.cmake.in
- ${CMAKE_CURRENT_BINARY_DIR}/CMakeFiles/cblas-config.cmake @ONLY)
-install(FILES
- ${CMAKE_CURRENT_BINARY_DIR}/CMakeFiles/cblas-config.cmake
- ${LAPACK_BINARY_DIR}/cblas-config-version.cmake
-- DESTINATION lib/cmake/cblas-${LAPACK_VERSION}
+- DESTINATION ${CMAKE_INSTALL_LIBDIR}/cmake/cblas-${LAPACK_VERSION}
- )
-
-#install(EXPORT cblas-targets
--# DESTINATION lib/cmake/cblas-${LAPACK_VERSION})
--
+-# DESTINATION ${CMAKE_INSTALL_LIBDIR}/cmake/cblas-${LAPACK_VERSION})
diff --git a/CBLAS/cmake/cblas-config-build.cmake.in b/CBLAS/cmake/cblas-config-build.cmake.in
deleted file mode 100644
--- a/CBLAS/cmake/cblas-config-build.cmake.in
@@ -76,24 +75,24 @@ deleted file mode 100644
- include("@LAPACK_BINARY_DIR@/lapack-targets.cmake")
-endif()
-
--# Report lapacke header search locations.
--set(CBLAS_INCLUDE_DIRS "@LAPACK_SOURCE_DIR@/cblas/include")
+-# Report cblas header search locations from build tree.
+-set(CBLAS_INCLUDE_DIRS "@LAPACK_BINARY_DIR@/include")
-
--# Report lapacke libraries.
+-# Report cblas libraries.
-set(CBLAS_LIBRARIES cblas)
diff --git a/CBLAS/cmake/cblas-config-install.cmake.in b/CBLAS/cmake/cblas-config-install.cmake.in
deleted file mode 100644
--- a/CBLAS/cmake/cblas-config-install.cmake.in
+++ /dev/null
@@ -1,23 +0,0 @@
--# Compute locations from <prefix>/lib/cmake/lapacke-<v>/<self>.cmake
+-# Compute locations from <prefix>/@{LIBRARY_DIR@/cmake/lapacke-<v>/<self>.cmake
-get_filename_component(_CBLAS_SELF_DIR "${CMAKE_CURRENT_LIST_FILE}" PATH)
-get_filename_component(_CBLAS_PREFIX "${_CBLAS_SELF_DIR}" PATH)
-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.
--set(LAPACK_DIR "${_CBLAS_PREFIX}/lib/cmake/lapack-@LAPACK_VERSION@")
+-set(LAPACK_DIR "${_CBLAS_PREFIX}/@{LIBRARY_DIR@/cmake/lapack-@LAPACK_VERSION@")
-find_package(LAPACK NO_MODULE)
-
-# Load lapacke targets from the install tree.
@@ -160,27 +159,58 @@ deleted file mode 100644
diff --git a/CMakeLists.txt b/CMakeLists.txt
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
-@@ -81,8 +81,6 @@
+@@ -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 @@
endif()
# --------------------------------------------------
-set(LAPACK_INSTALL_EXPORT_NAME lapack-targets)
-
- if (UNIX)
- include(GNUInstallDirs)
- set(ARCHIVE_DIR ${CMAKE_INSTALL_LIBDIR})
-@@ -96,7 +94,6 @@
-
macro(lapack_install_library lib)
install(TARGETS ${lib}
- EXPORT ${LAPACK_INSTALL_EXPORT_NAME}
- ARCHIVE DESTINATION ${ARCHIVE_DIR}
- LIBRARY DESTINATION ${LIBRARY_DIR}
- RUNTIME DESTINATION ${RUNTIME_DIR}
-@@ -122,20 +119,6 @@
- include( CheckLAPACKCompilerFlags )
+ ARCHIVE DESTINATION ${CMAKE_INSTALL_LIBDIR}
+ LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR}
+ 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 @@
+ include(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
-
@@ -193,82 +223,62 @@ diff --git a/CMakeLists.txt b/CMakeLists.txt
-CHECK_TIME_FUNCTION(INT_ETIME TIME_FUNC)
-message(STATUS "--> Will use second_${TIME_FUNC}.f and dsecnd_${TIME_FUNC}.f as timing function.")
-
--set(SECOND_SRC ${LAPACK_SOURCE_DIR}/INSTALL/second_${TIME_FUNC}.f)
--set(DSECOND_SRC ${LAPACK_SOURCE_DIR}/INSTALL/dsecnd_${TIME_FUNC}.f)
- set(PKG_CONFIG_DIR ${LIBRARY_DIR}/pkgconfig)
-
- set(prefix ${CMAKE_INSTALL_PREFIX})
-@@ -146,6 +129,11 @@
+-set(SECOND_SRC ${LAPACK_SOURCE_DIR}/INSTALL/second_${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
+ option(BUILD_DEPRECATED "Build deprecated routines" OFF)
+ message(STATUS "Build deprecated routines: ${BUILD_DEPRECATED}")
+@@ -178,8 +159,9 @@
endif()
# --------------------------------------------------
-+# By default static library
-+option(BUILD_SHARED_LIBS "Build shared libraries" OFF)
-+option(BUILD_STATIC_LIBS "Build static libraries" ON)
-+
-+# --------------------------------------------------
- # Precision to build
- # By default all precisions are generated
- option(BUILD_SINGLE "Build Single Precision" ON)
-@@ -176,236 +164,134 @@
- Please enable at least one of these: BUILD_SINGLE, BUILD_DOUBLE, BUILD_COMPLEX, BUILD_COMPLEX16.")
- endif()
-
--# --------------------------------------------------
-# Subdirectories that need to be processed
-+# deprecated LAPACK routines
-+option(BUILD_DEPRECATED "Build deprecated routines" OFF)
-
-+# --------------------------------------------------
+# BLAS
option(USE_OPTIMIZED_BLAS "Whether or not to use an optimized BLAS library instead of included netlib BLAS" OFF)
--
+option(BUILD_BLAS "Build BLAS" OFF)
# Check the usage of the user provided BLAS libraries
if(BLAS_LIBRARIES)
- include(CheckFortranFunctionExists)
- set(CMAKE_REQUIRED_LIBRARIES ${BLAS_LIBRARIES})
- CHECK_FORTRAN_FUNCTION_EXISTS("dgemm" BLAS_FOUND)
-- unset( CMAKE_REQUIRED_LIBRARIES )
-+ unset(CMAKE_REQUIRED_LIBRARIES)
+@@ -190,213 +172,117 @@
if(BLAS_FOUND)
message(STATUS "--> BLAS supplied by user is WORKING, will use ${BLAS_LIBRARIES}.")
-- else(BLAS_FOUND)
+ else()
- message(ERROR "--> BLAS supplied by user is not WORKING, CANNOT USE ${BLAS_LIBRARIES}.")
- message(ERROR "--> Will use REFERENCE BLAS (by default)")
- message(ERROR "--> Or Correct your BLAS_LIBRARIES entry ")
- message(ERROR "--> Or Consider checking USE_OPTIMIZED_BLAS")
-- endif(BLAS_FOUND)
-+ else()
+ message(SEND_ERROR "--> BLAS supplied by user is NOT WORKING, cannot use ${BLAS_LIBRARIES}.")
-+ endif()
+ endif()
# User did not provide a BLAS Library but specified to search for one
--elseif( USE_OPTIMIZED_BLAS )
-- find_package( BLAS )
--endif (BLAS_LIBRARIES)
-+elseif(USE_OPTIMIZED_BLAS)
-+ find_package(BLAS)
+ elseif(USE_OPTIMIZED_BLAS)
+ find_package(BLAS)
+-endif()
-# Neither user specified or optimized BLAS libraries can be used
-if(NOT BLAS_FOUND)
- message(STATUS "Using supplied NETLIB BLAS implementation")
- add_subdirectory(BLAS)
-- set( BLAS_LIBRARIES blas )
++elseif(BUILD_BLAS)
+ set(BLAS_LIBRARIES blas)
-else()
-- set( CMAKE_EXE_LINKER_FLAGS
-- "${CMAKE_EXE_LINKER_FLAGS} ${BLAS_LINKER_FLAGS}"
+- set(CMAKE_EXE_LINKER_FLAGS
+- "${CMAKE_EXE_LINKER_FLAGS} ${BLAS_LINKER_FLAGS}"
- CACHE STRING "Linker flags for executables" FORCE)
-- set( CMAKE_MODULE_LINKER_FLAGS
-- "${CMAKE_MODULE_LINKER_FLAGS} ${BLAS_LINKER_FLAGS}"
+- set(CMAKE_MODULE_LINKER_FLAGS
+- "${CMAKE_MODULE_LINKER_FLAGS} ${BLAS_LINKER_FLAGS}"
- CACHE STRING "Linker flags for modules" FORCE)
-- set( CMAKE_SHARED_LINKER_FLAGS
-- "${CMAKE_SHARED_LINKER_FLAGS} ${BLAS_LINKER_FLAGS}"
+- set(CMAKE_SHARED_LINKER_FLAGS
+- "${CMAKE_SHARED_LINKER_FLAGS} ${BLAS_LINKER_FLAGS}"
- CACHE STRING "Linker flags for shared libs" FORCE)
--endif( NOT BLAS_FOUND )
-+elseif(BUILD_BLAS)
-+ set(BLAS_LIBRARIES blas)
+-endif()
+ set(BLAS_FOUND TRUE)
+ add_subdirectory(BLAS)
@@ -283,27 +293,25 @@ diff --git a/CMakeLists.txt b/CMakeLists.txt
+if(BUILD_CBLAS)
+ set(NEED_BLAS TRUE)
add_subdirectory(CBLAS)
--endif(CBLAS)
-+endif(BUILD_CBLAS)
+ endif()
# --------------------------------------------------
# XBLAS
-
option(USE_XBLAS "Build extended precision (needs XBLAS)" OFF)
--if (USE_XBLAS)
+
-+if(USE_XBLAS)
+ if(USE_XBLAS)
find_library(XBLAS_LIBRARY NAMES xblas)
- endif(USE_XBLAS)
--
--option(USE_OPTIMIZED_LAPACK "Whether or not to use an optimized LAPACK library instead of included netlib LAPACK" OFF)
+ endif()
+-option(USE_OPTIMIZED_LAPACK "Whether or not to use an optimized LAPACK library instead of included netlib LAPACK" OFF)
+-
# --------------------------------------------------
# LAPACK
-# User did not provide a LAPACK Library but specified to search for one
--if( USE_OPTIMIZED_LAPACK )
-- find_package( LAPACK )
--endif (USE_OPTIMIZED_LAPACK)
+-if(USE_OPTIMIZED_LAPACK)
+- find_package(LAPACK)
+-endif()
+option(USE_OPTIMIZED_LAPACK "Whether or not to use an optimized LAPACK library instead of included netlib LAPACK" OFF)
+option(BUILD_LAPACK "Build LAPACK" OFF)
@@ -313,29 +321,29 @@ diff --git a/CMakeLists.txt b/CMakeLists.txt
set(CMAKE_REQUIRED_LIBRARIES ${LAPACK_LIBRARIES})
# Check if new routine of 3.4.0 is in LAPACK_LIBRARIES
- CHECK_FORTRAN_FUNCTION_EXISTS("dgeqrt" LATESTLAPACK_FOUND)
-- unset( CMAKE_REQUIRED_LIBRARIES )
-- if(LATESTLAPACK_FOUND)
+ CHECK_FORTRAN_FUNCTION_EXISTS("dgeqrt" LAPACK_FOUND)
-+ unset(CMAKE_REQUIRED_LIBRARIES)
+ unset(CMAKE_REQUIRED_LIBRARIES)
+- if(LATESTLAPACK_FOUND)
+ if(LAPACK_FOUND)
message(STATUS "--> LAPACK supplied by user is WORKING, will use ${LAPACK_LIBRARIES}.")
-- else(LAPACK_FOUND)
-- message(ERROR "--> LAPACK supplied by user is not WORKING or is older than LAPACK 3.4.0, CANNOT USE ${LAPACK_LIBRARIES}.")
+ else()
+- message(ERROR "--> LAPACK supplied by user is not WORKING or is older than LAPACK 3.4.0, CANNOT USE ${LAPACK_LIBRARIES}.")
- message(ERROR "--> Will use REFERENCE LAPACK (by default)")
- message(ERROR "--> Or Correct your LAPACK_LIBRARIES entry ")
- message(ERROR "--> Or Consider checking USE_OPTIMIZED_LAPACK")
-- endif(LATESTLAPACK_FOUND)
--endif (LAPACK_LIBRARIES)
-+ else()
+ message(SEND_ERROR "--> LAPACK supplied by user is NOT WORKING or is older than LAPACK 3.4.0, cannot use ${LAPACK_LIBRARIES}.")
-+ endif()
-+
+ endif()
+-endif()
+
+-# Neither user specified or optimized LAPACK libraries can be used
+-if(NOT LATESTLAPACK_FOUND)
+- message(STATUS "Using supplied NETLIB LAPACK implementation")
+# User did not provide a LAPACK Library but specified to search for one
+elseif(USE_OPTIMIZED_LAPACK)
+ find_package(LAPACK)
+
+elseif(BUILD_LAPACK)
-+ set(LAPACK_LIBRARIES lapack)
+ set(LAPACK_LIBRARIES lapack)
+ set(LAPACK_FOUND TRUE)
+
+ set(NEED_BLAS TRUE)
@@ -350,34 +358,24 @@ diff --git a/CMakeLists.txt b/CMakeLists.txt
+ CHECK_TIME_FUNCTION(INT_ETIME TIME_FUNC)
+ message(STATUS "--> Will use second_${TIME_FUNC}.f and dsecnd_${TIME_FUNC}.f as timing function.")
+
-+ set(SECOND_SRC ${LAPACK_SOURCE_DIR}/INSTALL/second_${TIME_FUNC}.f)
-+ set(DSECOND_SRC ${LAPACK_SOURCE_DIR}/INSTALL/dsecnd_${TIME_FUNC}.f)
-
--# Neither user specified or optimized LAPACK libraries can be used
--if(NOT LATESTLAPACK_FOUND)
-- message(STATUS "Using supplied NETLIB LAPACK implementation")
-- set( LAPACK_LIBRARIES lapack )
++ set(SECOND_SRC ${LAPACK_SOURCE_DIR}/INSTALL/second_${TIME_FUNC}.f)
++ set(DSECOND_SRC ${LAPACK_SOURCE_DIR}/INSTALL/dsecnd_${TIME_FUNC}.f)
++
add_subdirectory(SRC)
-else()
-- set( CMAKE_EXE_LINKER_FLAGS
-- "${CMAKE_EXE_LINKER_FLAGS} ${LAPACK_LINKER_FLAGS}"
+- set(CMAKE_EXE_LINKER_FLAGS
+- "${CMAKE_EXE_LINKER_FLAGS} ${LAPACK_LINKER_FLAGS}"
- CACHE STRING "Linker flags for executables" FORCE)
-- set( CMAKE_MODULE_LINKER_FLAGS
-- "${CMAKE_MODULE_LINKER_FLAGS} ${LAPACK_LINKER_FLAGS}"
+- set(CMAKE_MODULE_LINKER_FLAGS
+- "${CMAKE_MODULE_LINKER_FLAGS} ${LAPACK_LINKER_FLAGS}"
- CACHE STRING "Linker flags for modules" FORCE)
-- set( CMAKE_SHARED_LINKER_FLAGS
-- "${CMAKE_SHARED_LINKER_FLAGS} ${LAPACK_LINKER_FLAGS}"
+- set(CMAKE_SHARED_LINKER_FLAGS
+- "${CMAKE_SHARED_LINKER_FLAGS} ${LAPACK_LINKER_FLAGS}"
- CACHE STRING "Linker flags for shared libs" FORCE)
--endif( NOT LATESTLAPACK_FOUND )
--
--message(STATUS "BUILD TESTING : ${BUILD_TESTING}" )
+-endif()
+
-if(BUILD_TESTING)
- add_subdirectory(TESTING)
--endif(BUILD_TESTING)
-
--# deprecated LAPACK routines
--option(BUILD_DEPRECATED "Build deprecated routines" OFF)
-+ message(STATUS "BUILD TESTING : ${BUILD_TESTING}")
+ if(BUILD_TESTING)
+ add_subdirectory(TESTING)
+ endif()
@@ -385,8 +383,9 @@ diff --git a/CMakeLists.txt b/CMakeLists.txt
+ configure_file(${CMAKE_CURRENT_SOURCE_DIR}/lapack.pc.in ${CMAKE_CURRENT_BINARY_DIR}/lapack.pc @ONLY)
+ install(FILES
+ ${CMAKE_CURRENT_BINARY_DIR}/lapack.pc
-+ DESTINATION ${PKG_CONFIG_DIR})
-+endif()
++ DESTINATION ${PKG_CONFIG_DIR}
++ )
+ endif()
# --------------------------------------------------
# LAPACKE
@@ -396,93 +395,88 @@ diff --git a/CMakeLists.txt b/CMakeLists.txt
# LAPACKE has also the interface to some routines from tmglib,
# if LAPACKE_WITH_TMG is selected, we need to add those routines to LAPACKE
option(LAPACKE_WITH_TMG "Build LAPACKE with tmglib routines" OFF)
- if (LAPACKE_WITH_TMG)
+ if(LAPACKE_WITH_TMG)
- set(LAPACKE ON)
+ set(BUILD_LAPACKE ON)
- if(NOT BUILD_TESTING)
- add_subdirectory(TESTING/MATGEN)
- endif(NOT BUILD_TESTING)
- endif(LAPACKE_WITH_TMG)
+ endif()
+ if(BUILD_TESTING OR LAPACKE_WITH_TMG) #already included, avoid double inclusion
+ add_subdirectory(TESTING/MATGEN)
+ endif()
-if(LAPACKE)
+if(BUILD_LAPACKE)
+ set(NEED_LAPACK TRUE)
add_subdirectory(LAPACKE)
--endif(LAPACKE)
--
+ endif()
+
-# --------------------------------------------------
--# CPACK Packaging
+-# CPACK Packaging
-
--SET(CPACK_PACKAGE_NAME "LAPACK")
--SET(CPACK_PACKAGE_VENDOR "University of Tennessee, Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd")
--SET(CPACK_PACKAGE_DESCRIPTION_SUMMARY "LAPACK- Linear Algebra Package")
+-set(CPACK_PACKAGE_NAME "LAPACK")
+-set(CPACK_PACKAGE_VENDOR "University of Tennessee, Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd")
+-set(CPACK_PACKAGE_DESCRIPTION_SUMMARY "LAPACK- Linear Algebra Package")
-set(CPACK_PACKAGE_VERSION_MAJOR 3)
-set(CPACK_PACKAGE_VERSION_MINOR 5)
-set(CPACK_PACKAGE_VERSION_PATCH 0)
-set(CPACK_RESOURCE_FILE_LICENSE "${CMAKE_CURRENT_SOURCE_DIR}/LICENSE")
--SET(CPACK_PACKAGE_INSTALL_DIRECTORY "LAPACK")
--IF(WIN32 AND NOT UNIX)
+-set(CPACK_PACKAGE_INSTALL_DIRECTORY "LAPACK")
+-if(WIN32 AND NOT UNIX)
- # There is a bug in NSI that does not handle full unix paths properly. Make
- # sure there is at least one set of four (4) backlasshes.
-- SET(CPACK_NSIS_HELP_LINK "http:\\\\\\\\http://icl.cs.utk.edu/lapack-forum")
-- SET(CPACK_NSIS_URL_INFO_ABOUT "http:\\\\\\\\www.netlib.org/lapack")
-- SET(CPACK_NSIS_CONTACT "lapack@eecs.utk.edu")
-- SET(CPACK_NSIS_MODIFY_PATH ON)
-- SET(CPACK_NSIS_DISPLAY_NAME "LAPACK-${LAPACK_VERSION}")
+- set(CPACK_NSIS_HELP_LINK "http:\\\\\\\\http://icl.cs.utk.edu/lapack-forum")
+- set(CPACK_NSIS_URL_INFO_ABOUT "http:\\\\\\\\www.netlib.org/lapack")
+- set(CPACK_NSIS_CONTACT "lapack@eecs.utk.edu")
+- set(CPACK_NSIS_MODIFY_PATH ON)
+- set(CPACK_NSIS_DISPLAY_NAME "LAPACK-${LAPACK_VERSION}")
- set(CPACK_PACKAGE_RELOCATABLE "true")
--ELSE(WIN32 AND NOT UNIX)
-- SET(CPACK_GENERATOR "TGZ")
-- SET(CPACK_SOURCE_GENERATOR TGZ)
-- SET(CPACK_SOURCE_PACKAGE_FILE_NAME "lapack-${LAPACK_VERSION}" )
-- SET(CPACK_SOURCE_IGNORE_FILES ~$ .svn ${CPACK_SOURCE_IGNORE_FILES} )
--ENDIF(WIN32 AND NOT UNIX)
--INCLUDE(CPack)
-+endif(BUILD_LAPACKE)
-
-
+-else()
+- set(CPACK_GENERATOR "TGZ")
+- set(CPACK_SOURCE_GENERATOR TGZ)
+- set(CPACK_SOURCE_PACKAGE_FILE_NAME "lapack-${LAPACK_VERSION}")
+- set(CPACK_SOURCE_IGNORE_FILES ~$ .svn ${CPACK_SOURCE_IGNORE_FILES})
+-endif()
+-include(CPack)
+-
+-
-# --------------------------------------------------
--# By default static library
--OPTION(BUILD_SHARED_LIBS "Build shared libraries" OFF )
--OPTION(BUILD_STATIC_LIBS "Build static libraries" ON )
--#OPTION(BUILD_SHARED_LIBS "Build shared libraries" ON )
-
-if(NOT BLAS_FOUND)
- set(ALL_TARGETS ${ALL_TARGETS} blas)
--endif(NOT BLAS_FOUND)
--
+-endif()
+
-if(NOT LATESTLAPACK_FOUND)
- set(ALL_TARGETS ${ALL_TARGETS} lapack)
--endif(NOT LATESTLAPACK_FOUND)
+-endif()
-
-if(BUILD_TESTING OR LAPACKE_WITH_TMG)
- set(ALL_TARGETS ${ALL_TARGETS} tmglib)
--endif(BUILD_TESTING OR LAPACKE_WITH_TMG)
+-endif()
-
-# Export lapack targets, not including lapacke, from the
-# install tree, if any.
-set(_lapack_config_install_guard_target "")
-if(ALL_TARGETS)
- install(EXPORT lapack-targets
-- DESTINATION ${LIBRARY_DIR}/cmake/lapack-${LAPACK_VERSION})
+- DESTINATION ${CMAKE_INSTALL_LIBDIR}/cmake/lapack-${LAPACK_VERSION})
-
- # Choose one of the lapack targets to use as a guard for
- # lapack-config.cmake to load targets from the install tree.
- list(GET ALL_TARGETS 0 _lapack_config_install_guard_target)
-+# Neither user specified or optimized BLAS libraries can be used
-+if(NEED_BLAS AND NOT BLAS_FOUND)
-+ message(FATAL_ERROR "--> No BLAS library found. Specify BLAS_LIBRARIES or enable USE_OPTIMIZED_BLAS or BUILD_BLAS.")
- endif()
-
+-endif()
+-
-# Include cblas in targets exported from the build tree.
-if(CBLAS)
- set(ALL_TARGETS ${ALL_TARGETS} cblas)
--endif(CBLAS)
+-endif()
-
-# Include lapacke in targets exported from the build tree.
-if(LAPACKE)
- set(ALL_TARGETS ${ALL_TARGETS} lapacke)
--endif(LAPACKE)
--
++# Neither user specified or optimized BLAS libraries can be used
++if(NEED_BLAS AND NOT BLAS_FOUND)
++ message(FATAL_ERROR "--> No BLAS library found. Specify BLAS_LIBRARIES or enable USE_OPTIMIZED_BLAS or BUILD_BLAS.")
+ endif()
+
-# Export lapack and lapacke targets from the build tree, if any.
-set(_lapack_config_build_guard_target "")
-if(ALL_TARGETS)
@@ -504,7 +498,7 @@ diff --git a/CMakeLists.txt b/CMakeLists.txt
- install(FILES
- ${CMAKE_CURRENT_BINARY_DIR}/lapack.pc
- DESTINATION ${PKG_CONFIG_DIR}
-- )
+- )
-
-configure_file(${LAPACK_SOURCE_DIR}/CMAKE/lapack-config-install.cmake.in
- ${LAPACK_BINARY_DIR}/CMakeFiles/lapack-config.cmake @ONLY)
@@ -519,7 +513,7 @@ diff --git a/CMakeLists.txt b/CMakeLists.txt
-install(FILES
- ${LAPACK_BINARY_DIR}/CMakeFiles/lapack-config.cmake
- ${LAPACK_BINARY_DIR}/lapack-config-version.cmake
-- DESTINATION ${LIBRARY_DIR}/cmake/lapack-${LAPACK_VERSION}
+- DESTINATION ${CMAKE_INSTALL_LIBDIR}/cmake/lapack-${LAPACK_VERSION}
- )
diff --git a/LAPACKE/CMakeLists.txt b/LAPACKE/CMakeLists.txt
--- a/LAPACKE/CMakeLists.txt
@@ -530,13 +524,13 @@ diff --git a/LAPACKE/CMakeLists.txt b/LAPACKE/CMakeLists.txt
-set(LAPACK_INSTALL_EXPORT_NAME lapacke-targets)
-
- # Create a header file netlib.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)
- FortranCInterface_HEADER( ${CMAKE_CURRENT_SOURCE_DIR}/include/lapacke_mangling.h
-@@ -74,19 +72,3 @@
+ ## Ensure that the fortran compiler and c compiler specified are compatible
+@@ -79,19 +77,3 @@
${CMAKE_CURRENT_BINARY_DIR}/lapacke.pc
DESTINATION ${PKG_CONFIG_DIR}
- )
+ )
-
-configure_file(${CMAKE_CURRENT_SOURCE_DIR}/cmake/lapacke-config-version.cmake.in
- ${LAPACK_BINARY_DIR}/lapacke-config-version.cmake @ONLY)
@@ -548,11 +542,11 @@ diff --git a/LAPACKE/CMakeLists.txt b/LAPACKE/CMakeLists.txt
-install(FILES
- ${CMAKE_CURRENT_BINARY_DIR}/CMakeFiles/lapacke-config.cmake
- ${LAPACK_BINARY_DIR}/lapacke-config-version.cmake
-- DESTINATION ${LIBRARY_DIR}/cmake/lapacke-${LAPACK_VERSION}
+- DESTINATION ${CMAKE_INSTALL_LIBDIR}/cmake/lapacke-${LAPACK_VERSION}
- )
-
-install(EXPORT lapacke-targets
-- DESTINATION lib/cmake/lapacke-${LAPACK_VERSION})
+- DESTINATION ${CMAKE_INSTALL_LIBDIR}/cmake/lapacke-${LAPACK_VERSION})
diff --git a/LAPACKE/cmake/lapacke-config-build.cmake.in b/LAPACKE/cmake/lapacke-config-build.cmake.in
deleted file mode 100644
--- a/LAPACKE/cmake/lapacke-config-build.cmake.in
@@ -567,8 +561,8 @@ deleted file mode 100644
- include("@LAPACK_BINARY_DIR@/lapack-targets.cmake")
-endif()
-
--# Report lapacke header search locations.
--set(LAPACKE_INCLUDE_DIRS "@LAPACK_SOURCE_DIR@/lapacke/include")
+-# Report lapacke header search locations from build tree.
+-set(LAPACKE_INCLUDE_DIRS "@LAPACK_BINARY_DIR@/include")
-
-# Report lapacke libraries.
-set(LAPACKE_LIBRARIES lapacke)
@@ -577,14 +571,14 @@ deleted file mode 100644
--- a/LAPACKE/cmake/lapacke-config-install.cmake.in
+++ /dev/null
@@ -1,23 +0,0 @@
--# Compute locations from <prefix>/lib/cmake/lapacke-<v>/<self>.cmake
+-# Compute locations from <prefix>/@{LIBRARY_DIR@/cmake/lapacke-<v>/<self>.cmake
-get_filename_component(_LAPACKE_SELF_DIR "${CMAKE_CURRENT_LIST_FILE}" PATH)
-get_filename_component(_LAPACKE_PREFIX "${_LAPACKE_SELF_DIR}" PATH)
-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.
--set(LAPACK_DIR "${_LAPACKE_PREFIX}/lib/cmake/lapack-@LAPACK_VERSION@")
+-set(LAPACK_DIR "${_LAPACKE_PREFIX}/@{LIBRARY_DIR@/cmake/lapack-@LAPACK_VERSION@")
-find_package(LAPACK NO_MODULE)
-
-# Load lapacke targets from the install tree.