aboutsummaryrefslogtreecommitdiff
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.diff93
1 files changed, 65 insertions, 28 deletions
diff --git a/academic/cblas/patches/cmake-piecewise.diff b/academic/cblas/patches/cmake-piecewise.diff
index 8c2ac6c6a337c..b1bdfaec1e834 100644
--- a/academic/cblas/patches/cmake-piecewise.diff
+++ b/academic/cblas/patches/cmake-piecewise.diff
@@ -10,7 +10,7 @@ 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)
## Ensure that the fortran compiler and c compiler specified are compatible
-@@ -36,50 +34,8 @@
+@@ -41,54 +39,8 @@
add_subdirectory(examples)
endif()
@@ -23,7 +23,9 @@ diff --git a/CBLAS/CMakeLists.txt b/CBLAS/CMakeLists.txt
-set(_cblas_config_install_guard_target "")
-if(ALL_TARGETS)
- install(EXPORT cblas-targets
-- DESTINATION ${CMAKE_INSTALL_LIBDIR}/cmake/cblas-${LAPACK_VERSION})
+- DESTINATION ${CMAKE_INSTALL_LIBDIR}/cmake/cblas-${LAPACK_VERSION}
+- COMPONENT Development
+- )
- # 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)
@@ -60,7 +62,9 @@ diff --git a/CBLAS/CMakeLists.txt b/CBLAS/CMakeLists.txt
- )
-
-#install(EXPORT cblas-targets
--# DESTINATION ${CMAKE_INSTALL_LIBDIR}/cmake/cblas-${LAPACK_VERSION})
+-# DESTINATION ${CMAKE_INSTALL_LIBDIR}/cmake/cblas-${LAPACK_VERSION}
+-# COMPONENT Development
+-# )
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
@@ -138,7 +142,7 @@ diff --git a/CMAKE/lapack-config-build.cmake.in b/CMAKE/lapack-config-build.cmak
deleted file mode 100644
--- a/CMAKE/lapack-config-build.cmake.in
+++ /dev/null
-@@ -1,10 +0,0 @@
+@@ -1,14 +0,0 @@
-# Load lapack targets from the build tree if necessary.
-set(_LAPACK_TARGET "@_lapack_config_build_guard_target@")
-if(_LAPACK_TARGET AND NOT TARGET "${_LAPACK_TARGET}")
@@ -146,14 +150,18 @@ deleted file mode 100644
-endif()
-unset(_LAPACK_TARGET)
-
+-# Hint for project building against lapack
+-set(LAPACK_Fortran_COMPILER_ID "@CMAKE_Fortran_COMPILER_ID@")
+-
-# Report the blas and lapack raw or imported libraries.
-set(LAPACK_blas_LIBRARIES "@BLAS_LIBRARIES@")
-set(LAPACK_lapack_LIBRARIES "@LAPACK_LIBRARIES@")
+-set(LAPACK_LIBRARIES ${LAPACK_blas_LIBRARIES} ${LAPACK_lapack_LIBRARIES})
diff --git a/CMAKE/lapack-config-install.cmake.in b/CMAKE/lapack-config-install.cmake.in
deleted file mode 100644
--- a/CMAKE/lapack-config-install.cmake.in
+++ /dev/null
-@@ -1,15 +0,0 @@
+@@ -1,19 +0,0 @@
-# Compute locations from <prefix>/lib/cmake/lapack-<v>/<self>.cmake
-get_filename_component(_LAPACK_SELF_DIR "${CMAKE_CURRENT_LIST_FILE}" PATH)
-
@@ -164,27 +172,31 @@ deleted file mode 100644
-endif()
-unset(_LAPACK_TARGET)
-
+-# Hint for project building against lapack
+-set(LAPACK_Fortran_COMPILER_ID "@CMAKE_Fortran_COMPILER_ID@")
+-
-# Report the blas and lapack raw or imported libraries.
-set(LAPACK_blas_LIBRARIES "@BLAS_LIBRARIES@")
-set(LAPACK_lapack_LIBRARIES "@LAPACK_LIBRARIES@")
+-set(LAPACK_LIBRARIES ${LAPACK_blas_LIBRARIES} ${LAPACK_lapack_LIBRARIES})
-
-unset(_LAPACK_SELF_DIR)
diff --git a/CMakeLists.txt b/CMakeLists.txt
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
-@@ -106,11 +106,8 @@
- endif()
- # --------------------------------------------------
+@@ -112,11 +112,8 @@
+
+ # --------------------------------------------------
-set(LAPACK_INSTALL_EXPORT_NAME lapack-targets)
-
macro(lapack_install_library lib)
install(TARGETS ${lib}
- EXPORT ${LAPACK_INSTALL_EXPORT_NAME}
- ARCHIVE DESTINATION ${CMAKE_INSTALL_LIBDIR}
- LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR}
- RUNTIME DESTINATION ${CMAKE_INSTALL_BINDIR}
-@@ -139,21 +136,6 @@
+ ARCHIVE DESTINATION ${CMAKE_INSTALL_LIBDIR} COMPONENT Development
+ LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR} COMPONENT RuntimeLibraries
+ RUNTIME DESTINATION ${CMAKE_INSTALL_BINDIR} COMPONENT RuntimeLibraries
+@@ -155,21 +152,6 @@
include(CheckLAPACKCompilerFlags)
CheckLAPACKCompilerFlags()
@@ -206,7 +218,7 @@ diff --git a/CMakeLists.txt b/CMakeLists.txt
# deprecated LAPACK and LAPACKE routines
option(BUILD_DEPRECATED "Build deprecated routines" OFF)
message(STATUS "Build deprecated routines: ${BUILD_DEPRECATED}")
-@@ -177,8 +159,9 @@
+@@ -193,8 +175,9 @@
endif()
# --------------------------------------------------
@@ -217,7 +229,7 @@ diff --git a/CMakeLists.txt b/CMakeLists.txt
# Check the usage of the user provided BLAS libraries
if(BLAS_LIBRARIES)
-@@ -189,213 +172,117 @@
+@@ -205,113 +188,108 @@
if(BLAS_FOUND)
message(STATUS "--> BLAS supplied by user is WORKING, will use ${BLAS_LIBRARIES}.")
else()
@@ -355,6 +367,7 @@ diff --git a/CMakeLists.txt b/CMakeLists.txt
+ install(FILES
+ ${CMAKE_CURRENT_BINARY_DIR}/lapack.pc
+ DESTINATION ${PKG_CONFIG_DIR}
++ COMPONENT Development
+ )
endif()
@@ -380,16 +393,21 @@ diff --git a/CMakeLists.txt b/CMakeLists.txt
add_subdirectory(LAPACKE)
endif()
+@@ -338,109 +316,12 @@
+ _display_cpp_implementation_msg("LAPACK")
+ endif()
+
-# --------------------------------------------------
-# 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_VERSION_MAJOR 3)
--set(CPACK_PACKAGE_VERSION_MINOR 5)
--set(CPACK_PACKAGE_VERSION_PATCH 0)
+-set(CPACK_PACKAGE_VERSION_MAJOR ${LAPACK_MAJOR_VERSION})
+-set(CPACK_PACKAGE_VERSION_MINOR ${LAPACK_MINOR_VERSION})
+-set(CPACK_PACKAGE_VERSION_PATCH ${LAPACK_PATCH_VERSION})
-set(CPACK_RESOURCE_FILE_LICENSE "${CMAKE_CURRENT_SOURCE_DIR}/LICENSE")
+-set(CPACK_MONOLITHIC_INSTALL ON)
-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
@@ -428,8 +446,10 @@ diff --git a/CMakeLists.txt b/CMakeLists.txt
-set(_lapack_config_install_guard_target "")
-if(ALL_TARGETS)
- install(EXPORT lapack-targets
-- DESTINATION ${CMAKE_INSTALL_LIBDIR}/cmake/lapack-${LAPACK_VERSION})
-
+- DESTINATION ${CMAKE_INSTALL_LIBDIR}/cmake/lapack-${LAPACK_VERSION}
+- COMPONENT Development
+- )
+-
- # 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)
@@ -469,6 +489,7 @@ diff --git a/CMakeLists.txt b/CMakeLists.txt
- install(FILES
- ${CMAKE_CURRENT_BINARY_DIR}/lapack.pc
- DESTINATION ${PKG_CONFIG_DIR}
+- COMPONENT Development
- )
-
-configure_file(${LAPACK_SOURCE_DIR}/CMAKE/lapack-config-install.cmake.in
@@ -485,7 +506,10 @@ diff --git a/CMakeLists.txt b/CMakeLists.txt
- ${LAPACK_BINARY_DIR}/CMakeFiles/lapack-config.cmake
- ${LAPACK_BINARY_DIR}/lapack-config-version.cmake
- DESTINATION ${CMAKE_INSTALL_LIBDIR}/cmake/lapack-${LAPACK_VERSION}
+- COMPONENT Development
- )
+-
+\ No newline at end of file
diff --git a/LAPACKE/CMakeLists.txt b/LAPACKE/CMakeLists.txt
--- a/LAPACKE/CMakeLists.txt
+++ b/LAPACKE/CMakeLists.txt
@@ -498,20 +522,24 @@ 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
include(FortranCInterface)
## Ensure that the fortran compiler and c compiler specified are compatible
-@@ -60,10 +58,6 @@
+@@ -79,14 +77,6 @@
VERSION ${LAPACK_VERSION}
SOVERSION ${LAPACK_MAJOR_VERSION}
)
-target_include_directories(lapacke PUBLIC
-- $<BUILD_INTERFACE:${CMAKE_CURRENT_SOURCE_DIR}/../include>
+- $<BUILD_INTERFACE:${CMAKE_CURRENT_SOURCE_DIR}/include>
- $<INSTALL_INTERFACE:include>
-)
+-if(WIN32 AND NOT UNIX)
+- target_compile_definitions(lapacke PUBLIC HAVE_LAPACK_CONFIG_H LAPACK_COMPLEX_STRUCTURE)
+- message(STATUS "Windows BUILD")
+-endif()
if(LAPACKE_WITH_TMG)
target_link_libraries(lapacke PRIVATE tmglib)
-@@ -83,19 +77,3 @@
- ${CMAKE_CURRENT_BINARY_DIR}/lapacke.pc
+@@ -111,22 +101,3 @@
DESTINATION ${PKG_CONFIG_DIR}
+ COMPONENT Development
)
-
-configure_file(${CMAKE_CURRENT_SOURCE_DIR}/cmake/lapacke-config-version.cmake.in
@@ -525,15 +553,18 @@ diff --git a/LAPACKE/CMakeLists.txt b/LAPACKE/CMakeLists.txt
- ${CMAKE_CURRENT_BINARY_DIR}/CMakeFiles/lapacke-config.cmake
- ${LAPACK_BINARY_DIR}/lapacke-config-version.cmake
- DESTINATION ${CMAKE_INSTALL_LIBDIR}/cmake/lapacke-${LAPACK_VERSION}
+- COMPONENT Development
- )
-
-install(EXPORT lapacke-targets
-- DESTINATION ${CMAKE_INSTALL_LIBDIR}/cmake/lapacke-${LAPACK_VERSION})
+- DESTINATION ${CMAKE_INSTALL_LIBDIR}/cmake/lapacke-${LAPACK_VERSION}
+- COMPONENT Development
+- )
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
+++ /dev/null
-@@ -1,14 +0,0 @@
+@@ -1,17 +0,0 @@
-# Load the LAPACK package with which we were built.
-set(LAPACK_DIR "@LAPACK_BINARY_DIR@")
-find_package(LAPACK NO_MODULE)
@@ -543,16 +574,19 @@ deleted file mode 100644
- include("@LAPACK_BINARY_DIR@/lapack-targets.cmake")
-endif()
-
+-# Hint for project building against lapack
+-set(LAPACKE_Fortran_COMPILER_ID ${LAPACK_Fortran_COMPILER_ID})
+-
-# Report lapacke header search locations from build tree.
-set(LAPACKE_INCLUDE_DIRS "@LAPACK_BINARY_DIR@/include")
-
-# Report lapacke libraries.
--set(LAPACKE_LIBRARIES lapacke)
+-set(LAPACKE_LIBRARIES lapacke ${LAPACK_LIBRARIES})
diff --git a/LAPACKE/cmake/lapacke-config-install.cmake.in b/LAPACKE/cmake/lapacke-config-install.cmake.in
deleted file mode 100644
--- a/LAPACKE/cmake/lapacke-config-install.cmake.in
+++ /dev/null
-@@ -1,23 +0,0 @@
+@@ -1,26 +0,0 @@
-# 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)
@@ -568,11 +602,14 @@ deleted file mode 100644
- include(${_LAPACKE_SELF_DIR}/lapacke-targets.cmake)
-endif()
-
+-# Hint for project building against lapack
+-set(LAPACKE_Fortran_COMPILER_ID ${LAPACK_Fortran_COMPILER_ID})
+-
-# Report lapacke header search locations.
-set(LAPACKE_INCLUDE_DIRS ${_LAPACKE_PREFIX}/include)
-
-# Report lapacke libraries.
--set(LAPACKE_LIBRARIES lapacke)
+-set(LAPACKE_LIBRARIES lapacke ${LAPACK_LIBRARIES})
-
-unset(_LAPACKE_PREFIX)
-unset(_LAPACKE_SELF_DIR)