123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616 |
- diff --git a/CBLAS/CMakeLists.txt b/CBLAS/CMakeLists.txt
- --- a/CBLAS/CMakeLists.txt
- +++ b/CBLAS/CMakeLists.txt
- @@ -1,8 +1,6 @@
- message(STATUS "CBLAS enable")
- enable_language(C)
-
- -set(LAPACK_INSTALL_EXPORT_NAME ${CBLASLIB}-targets)
- -
- # 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
- @@ -51,22 +49,3 @@
- DESTINATION ${PKG_CONFIG_DIR}
- COMPONENT Development
- )
- -
- -configure_file(${CMAKE_CURRENT_SOURCE_DIR}/cmake/cblas-config-version.cmake.in
- - ${LAPACK_BINARY_DIR}/${CBLASLIB}-config-version.cmake @ONLY)
- -configure_file(${CMAKE_CURRENT_SOURCE_DIR}/cmake/cblas-config-build.cmake.in
- - ${LAPACK_BINARY_DIR}/${CBLASLIB}-config.cmake @ONLY)
- -
- -configure_file(${CMAKE_CURRENT_SOURCE_DIR}/cmake/cblas-config-install.cmake.in
- - ${CMAKE_CURRENT_BINARY_DIR}/CMakeFiles/${CBLASLIB}-config.cmake @ONLY)
- -install(FILES
- - ${CMAKE_CURRENT_BINARY_DIR}/CMakeFiles/${CBLASLIB}-config.cmake
- - ${LAPACK_BINARY_DIR}/${CBLASLIB}-config-version.cmake
- - DESTINATION ${CMAKE_INSTALL_LIBDIR}/cmake/${CBLASLIB}-${LAPACK_VERSION}
- - COMPONENT Development
- - )
- -
- -install(EXPORT ${CBLASLIB}-targets
- - DESTINATION ${CMAKE_INSTALL_LIBDIR}/cmake/${CBLASLIB}-${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
- +++ /dev/null
- @@ -1,14 +0,0 @@
- -# Load the LAPACK package with which we were built.
- -set(LAPACK_DIR "@LAPACK_BINARY_DIR@")
- -find_package(LAPACK NO_MODULE)
- -
- -# Load lapack targets from the build tree, including lapacke targets.
- -if(NOT TARGET lapacke)
- - include("@LAPACK_BINARY_DIR@/@LAPACKLIB@-targets.cmake")
- -endif()
- -
- -# Report cblas header search locations from build tree.
- -set(CBLAS_INCLUDE_DIRS "@LAPACK_BINARY_DIR@/include")
- -
- -# Report cblas libraries.
- -set(CBLAS_LIBRARIES @CBLASLIB@)
- 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>/@{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}/@CMAKE_INSTALL_LIBDIR@/cmake/@LAPACKLIB@-@LAPACK_VERSION@")
- -find_package(LAPACK NO_MODULE)
- -
- -# Load lapacke targets from the install tree.
- -if(NOT TARGET @CBLASLIB@)
- - include(${_CBLAS_SELF_DIR}/@CBLASLIB@-targets.cmake)
- -endif()
- -
- -# Report lapacke header search locations.
- -set(CBLAS_INCLUDE_DIRS ${_CBLAS_PREFIX}/include)
- -
- -# Report lapacke libraries.
- -set(CBLAS_LIBRARIES @CBLASLIB@)
- -
- -unset(_CBLAS_PREFIX)
- -unset(_CBLAS_SELF_DIR)
- diff --git a/CBLAS/cmake/cblas-config-version.cmake.in b/CBLAS/cmake/cblas-config-version.cmake.in
- deleted file mode 100644
- --- a/CBLAS/cmake/cblas-config-version.cmake.in
- +++ /dev/null
- @@ -1,8 +0,0 @@
- -set(PACKAGE_VERSION "@LAPACK_VERSION@")
- -if(NOT ${PACKAGE_FIND_VERSION} VERSION_GREATER ${PACKAGE_VERSION})
- - set(PACKAGE_VERSION_COMPATIBLE 1)
- - if(${PACKAGE_FIND_VERSION} VERSION_EQUAL ${PACKAGE_VERSION})
- - set(PACKAGE_VERSION_EXACT 1)
- - endif()
- -endif()
- -
- diff --git a/CBLAS/src/CMakeLists.txt b/CBLAS/src/CMakeLists.txt
- --- a/CBLAS/src/CMakeLists.txt
- +++ b/CBLAS/src/CMakeLists.txt
- @@ -123,9 +123,5 @@
- if(HAS_ATTRIBUTE_WEAK_SUPPORT)
- target_compile_definitions(${CBLASLIB} PRIVATE HAS_ATTRIBUTE_WEAK_SUPPORT)
- endif()
- -target_include_directories(${CBLASLIB} PUBLIC
- - $<BUILD_INTERFACE:${CMAKE_CURRENT_SOURCE_DIR}/../include>
- - $<INSTALL_INTERFACE:include>
- -)
- target_link_libraries(${CBLASLIB} PRIVATE ${BLAS_LIBRARIES})
- lapack_install_library(${CBLASLIB})
- diff --git a/CMAKE/lapack-config-build.cmake.in b/CMAKE/lapack-config-build.cmake.in
- deleted file mode 100644
- --- a/CMAKE/lapack-config-build.cmake.in
- +++ /dev/null
- @@ -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}")
- - include("@LAPACK_BINARY_DIR@/@LAPACKLIB@-targets.cmake")
- -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,19 +0,0 @@
- -# Compute locations from <prefix>/lib/cmake/lapack-<v>/<self>.cmake
- -get_filename_component(_LAPACK_SELF_DIR "${CMAKE_CURRENT_LIST_FILE}" PATH)
- -
- -# Load lapack targets from the install tree if necessary.
- -set(_LAPACK_TARGET "@_lapack_config_install_guard_target@")
- -if(_LAPACK_TARGET AND NOT TARGET "${_LAPACK_TARGET}")
- - include("${_LAPACK_SELF_DIR}/@LAPACKLIB@-targets.cmake")
- -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
- @@ -157,11 +157,8 @@
-
-
- # --------------------------------------------------
- -set(LAPACK_INSTALL_EXPORT_NAME ${LAPACKLIB}-targets)
- -
- macro(lapack_install_library lib)
- install(TARGETS ${lib}
- - EXPORT ${LAPACK_INSTALL_EXPORT_NAME}
- ARCHIVE DESTINATION ${CMAKE_INSTALL_LIBDIR} COMPONENT Development
- LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR} COMPONENT RuntimeLibraries
- RUNTIME DESTINATION ${CMAKE_INSTALL_BINDIR} COMPONENT RuntimeLibraries
- @@ -201,21 +198,6 @@
- include(CheckLAPACKCompilerFlags)
- CheckLAPACKCompilerFlags()
-
- -# --------------------------------------------------
- -# Check second function
- -
- -include(CheckTimeFunction)
- -set(NONE ${TIME_FUNC})
- -CHECK_TIME_FUNCTION(NONE TIME_FUNC)
- -CHECK_TIME_FUNCTION(INT_CPU_TIME TIME_FUNC)
- -CHECK_TIME_FUNCTION(EXT_ETIME TIME_FUNC)
- -CHECK_TIME_FUNCTION(EXT_ETIME_ TIME_FUNC)
- -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)
- -
- # deprecated LAPACK and LAPACKE routines
- option(BUILD_DEPRECATED "Build deprecated routines" OFF)
- message(STATUS "Build deprecated routines: ${BUILD_DEPRECATED}")
- @@ -239,8 +221,9 @@
- endif()
-
- # --------------------------------------------------
- -# Subdirectories that need to be processed
- +# 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)
- @@ -251,131 +234,105 @@
- if(BLAS_FOUND)
- message(STATUS "--> BLAS supplied by user is WORKING, will use ${BLAS_LIBRARIES}.")
- 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")
- + message(SEND_ERROR "--> BLAS supplied by user is NOT WORKING, cannot use ${BLAS_LIBRARIES}.")
- endif()
-
- # User did not provide a BLAS Library but specified to search for one
- 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)
- +elseif(BUILD_BLAS)
- set(BLAS_LIBRARIES ${BLASLIB})
- -else()
- - 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}"
- - CACHE STRING "Linker flags for modules" FORCE)
- - set(CMAKE_SHARED_LINKER_FLAGS
- - "${CMAKE_SHARED_LINKER_FLAGS} ${BLAS_LINKER_FLAGS}"
- - CACHE STRING "Linker flags for shared libs" FORCE)
- -endif()
- + set(BLAS_FOUND TRUE)
-
- + add_subdirectory(BLAS)
- +endif()
-
- # --------------------------------------------------
- # CBLAS
- -option(CBLAS "Build CBLAS" OFF)
- +option(BUILD_CBLAS "Build CBLAS" OFF)
-
- -if(CBLAS)
- +if(BUILD_CBLAS)
- + set(NEED_BLAS TRUE)
- add_subdirectory(CBLAS)
- endif()
-
- # --------------------------------------------------
- # XBLAS
- -
- option(USE_XBLAS "Build extended precision (needs XBLAS)" OFF)
- +
- if(USE_XBLAS)
- find_library(XBLAS_LIBRARY NAMES xblas)
- 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()
- +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)
-
- # Check the usage of the user provided or automatically found LAPACK libraries
- if(LAPACK_LIBRARIES)
- include(CheckFortranFunctionExists)
- 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)
- + CHECK_FORTRAN_FUNCTION_EXISTS("dgeqrt" LAPACK_FOUND)
- unset(CMAKE_REQUIRED_LIBRARIES)
- - if(LATESTLAPACK_FOUND)
- + if(LAPACK_FOUND)
- message(STATUS "--> LAPACK supplied by user is WORKING, will 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")
- + message(SEND_ERROR "--> LAPACK supplied by user is NOT WORKING or is older than LAPACK 3.4.0, cannot use ${LAPACK_LIBRARIES}.")
- 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 ${LAPACKLIB})
- + set(LAPACK_FOUND TRUE)
- +
- + set(NEED_BLAS TRUE)
- +
- + # Check second function
- + include(CheckTimeFunction)
- + set(NONE ${TIME_FUNC})
- + CHECK_TIME_FUNCTION(NONE TIME_FUNC)
- + CHECK_TIME_FUNCTION(INT_CPU_TIME TIME_FUNC)
- + CHECK_TIME_FUNCTION(EXT_ETIME TIME_FUNC)
- + CHECK_TIME_FUNCTION(EXT_ETIME_ TIME_FUNC)
- + 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)
- +
- add_subdirectory(SRC)
- -else()
- - 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}"
- - CACHE STRING "Linker flags for modules" FORCE)
- - set(CMAKE_SHARED_LINKER_FLAGS
- - "${CMAKE_SHARED_LINKER_FLAGS} ${LAPACK_LINKER_FLAGS}"
- - CACHE STRING "Linker flags for shared libs" FORCE)
- -endif()
-
- -if(BUILD_TESTING)
- - add_subdirectory(TESTING)
- + if(BUILD_TESTING)
- + add_subdirectory(TESTING)
- + endif()
- +
- + configure_file(${CMAKE_CURRENT_SOURCE_DIR}/lapack.pc.in ${CMAKE_CURRENT_BINARY_DIR}/${LAPACKLIB}.pc @ONLY)
- + install(FILES
- + ${CMAKE_CURRENT_BINARY_DIR}/${LAPACKLIB}.pc
- + DESTINATION ${PKG_CONFIG_DIR}
- + COMPONENT Development
- + )
- endif()
-
- # --------------------------------------------------
- # LAPACKE
- -option(LAPACKE "Build LAPACKE" OFF)
- +option(BUILD_LAPACKE "Build LAPACKE" OFF)
-
- # 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)
- - set(LAPACKE ON)
- + set(BUILD_LAPACKE ON)
- endif()
-
- -# TMGLIB
- -# Cache export target
- -set(LAPACK_INSTALL_EXPORT_NAME_CACHE ${LAPACK_INSTALL_EXPORT_NAME})
- -if(BUILD_TESTING OR LAPACKE_WITH_TMG)
- - if(LATESTLAPACK_FOUND AND LAPACKE_WITH_TMG)
- - set(CMAKE_REQUIRED_LIBRARIES ${LAPACK_LIBRARIES})
- - # Check if dlatms (part of tmg) is found
- - CHECK_FORTRAN_FUNCTION_EXISTS("dlatms" LAPACK_WITH_TMGLIB_FOUND)
- - unset(CMAKE_REQUIRED_LIBRARIES)
- - if(NOT LAPACK_WITH_TMGLIB_FOUND)
- - # Build and install TMG as part of LAPACKE targets (as opposed to LAPACK
- - # targets)
- - set(LAPACK_INSTALL_EXPORT_NAME ${LAPACKELIB}-targets)
- - endif()
- - endif()
- - add_subdirectory(TESTING/MATGEN)
- -endif()
- -# Reset export target
- -set(LAPACK_INSTALL_EXPORT_NAME ${LAPACK_INSTALL_EXPORT_NAME_CACHE})
- -unset(LAPACK_INSTALL_EXPORT_NAME_CACHE)
- -
- -if(LAPACKE)
- +if(BUILD_LAPACKE)
- + set(NEED_LAPACK TRUE)
- add_subdirectory(LAPACKE)
- endif()
-
- @@ -428,111 +385,16 @@
- ExternalProject_Add_StepDependencies(lapackpp build blaspp ${BLAS_LIBRARIES} ${LAPACK_LIBRARIES})
- 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 ${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
- - # 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_PACKAGE_RELOCATABLE "true")
- -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)
- -
- -
- -# --------------------------------------------------
- -
- -if(NOT BLAS_FOUND)
- - set(ALL_TARGETS ${ALL_TARGETS} ${BLASLIB})
- -endif()
- -
- -if(NOT LATESTLAPACK_FOUND)
- - set(ALL_TARGETS ${ALL_TARGETS} ${LAPACKLIB})
- -endif()
- -
- -# Export lapack targets, not including lapacke, from the
- -# install tree, if any.
- -set(_lapack_config_install_guard_target "")
- -if(ALL_TARGETS)
- - install(EXPORT ${LAPACKLIB}-targets
- - DESTINATION ${CMAKE_INSTALL_LIBDIR}/cmake/${LAPACKLIB}-${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)
- -endif()
- -
- -# Include cblas in targets exported from the build tree.
- -if(CBLAS)
- - set(ALL_TARGETS ${ALL_TARGETS} ${CBLASLIB})
- -endif()
- -
- -# Include lapacke in targets exported from the build tree.
- -if(LAPACKE)
- - set(ALL_TARGETS ${ALL_TARGETS} ${LAPACKELIB})
- -endif()
- -
- -if(NOT LAPACK_WITH_TMGLIB_FOUND AND LAPACKE_WITH_TMG)
- - set(ALL_TARGETS ${ALL_TARGETS} ${TMGLIB})
- +# 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)
- - export(TARGETS ${ALL_TARGETS} FILE ${LAPACKLIB}-targets.cmake)
- -
- - # Choose one of the lapack or lapacke targets to use as a guard
- - # for lapack-config.cmake to load targets from the build tree.
- - list(GET ALL_TARGETS 0 _lapack_config_build_guard_target)
- +# Neither user specified or optimized LAPACK libraries can be used
- +if(NEED_LAPACK AND NOT LAPACK_FOUND)
- + message(FATAL_ERROR "--> No LAPACK library found. Specify LAPACK_LIBRARIES or enable USE_OPTIMIZED_LAPACK or BUILD_LAPACK.")
- endif()
-
- -configure_file(${LAPACK_SOURCE_DIR}/CMAKE/lapack-config-build.cmake.in
- - ${LAPACK_BINARY_DIR}/${LAPACKLIB}-config.cmake @ONLY)
- -
- -
- -configure_file(${CMAKE_CURRENT_SOURCE_DIR}/lapack.pc.in ${CMAKE_CURRENT_BINARY_DIR}/${LAPACKLIB}.pc @ONLY)
- - install(FILES
- - ${CMAKE_CURRENT_BINARY_DIR}/${LAPACKLIB}.pc
- - DESTINATION ${PKG_CONFIG_DIR}
- - COMPONENT Development
- - )
- -
- -configure_file(${LAPACK_SOURCE_DIR}/CMAKE/lapack-config-install.cmake.in
- - ${LAPACK_BINARY_DIR}/CMakeFiles/${LAPACKLIB}-config.cmake @ONLY)
- -
- -include(CMakePackageConfigHelpers)
- -write_basic_package_version_file(
- - ${LAPACK_BINARY_DIR}/${LAPACKLIB}-config-version.cmake
- - VERSION ${LAPACK_VERSION}
- - COMPATIBILITY SameMajorVersion
- - )
- -
- -install(FILES
- - ${LAPACK_BINARY_DIR}/CMakeFiles/${LAPACKLIB}-config.cmake
- - ${LAPACK_BINARY_DIR}/${LAPACKLIB}-config-version.cmake
- - DESTINATION ${CMAKE_INSTALL_LIBDIR}/cmake/${LAPACKLIB}-${LAPACK_VERSION}
- - COMPONENT Development
- - )
- if (LAPACK++)
- install(
- DIRECTORY "${LAPACK_BINARY_DIR}/lib/"
- diff --git a/LAPACKE/CMakeLists.txt b/LAPACKE/CMakeLists.txt
- --- a/LAPACKE/CMakeLists.txt
- +++ b/LAPACKE/CMakeLists.txt
- @@ -1,8 +1,6 @@
- message(STATUS "LAPACKE enable")
- enable_language(C)
-
- -set(LAPACK_INSTALL_EXPORT_NAME ${LAPACKELIB}-targets)
- -
- # 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
- @@ -79,14 +77,6 @@
- VERSION ${LAPACK_VERSION}
- SOVERSION ${LAPACK_MAJOR_VERSION}
- )
- -target_include_directories(${LAPACKELIB} PUBLIC
- - $<BUILD_INTERFACE:${CMAKE_CURRENT_SOURCE_DIR}/include>
- - $<INSTALL_INTERFACE:include>
- -)
- -if(WIN32 AND NOT UNIX)
- - target_compile_definitions(${LAPACKELIB} PUBLIC HAVE_LAPACK_CONFIG_H LAPACK_COMPLEX_STRUCTURE)
- - message(STATUS "Windows BUILD")
- -endif()
-
- if(LAPACKE_WITH_TMG)
- target_link_libraries(${LAPACKELIB} PRIVATE ${TMGLIB})
- @@ -111,22 +101,3 @@
- DESTINATION ${PKG_CONFIG_DIR}
- COMPONENT Development
- )
- -
- -configure_file(${CMAKE_CURRENT_SOURCE_DIR}/cmake/lapacke-config-version.cmake.in
- - ${LAPACK_BINARY_DIR}/${LAPACKELIB}-config-version.cmake @ONLY)
- -configure_file(${CMAKE_CURRENT_SOURCE_DIR}/cmake/lapacke-config-build.cmake.in
- - ${LAPACK_BINARY_DIR}/${LAPACKELIB}-config.cmake @ONLY)
- -
- -configure_file(${CMAKE_CURRENT_SOURCE_DIR}/cmake/lapacke-config-install.cmake.in
- - ${CMAKE_CURRENT_BINARY_DIR}/CMakeFiles/${LAPACKELIB}-config.cmake @ONLY)
- -install(FILES
- - ${CMAKE_CURRENT_BINARY_DIR}/CMakeFiles/${LAPACKELIB}-config.cmake
- - ${LAPACK_BINARY_DIR}/${LAPACKELIB}-config-version.cmake
- - DESTINATION ${CMAKE_INSTALL_LIBDIR}/cmake/${LAPACKELIB}-${LAPACK_VERSION}
- - COMPONENT Development
- - )
- -
- -install(EXPORT ${LAPACKELIB}-targets
- - DESTINATION ${CMAKE_INSTALL_LIBDIR}/cmake/${LAPACKELIB}-${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,17 +0,0 @@
- -# Load the LAPACK package with which we were built.
- -set(LAPACK_DIR "@LAPACK_BINARY_DIR@")
- -find_package(LAPACK NO_MODULE)
- -
- -# Load lapack targets from the build tree, including lapacke targets.
- -if(NOT TARGET @LAPACKELIB@)
- - include("@LAPACK_BINARY_DIR@/@LAPACKLIB@-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 @LAPACKELIB@ ${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,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)
- -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}/@CMAKE_INSTALL_LIBDIR@/cmake/@LAPACKLIB@-@LAPACK_VERSION@")
- -find_package(LAPACK NO_MODULE)
- -
- -# Load lapacke targets from the install tree.
- -if(NOT TARGET @LAPACKELIB@)
- - include(${_LAPACKE_SELF_DIR}/@LAPACKELIB@-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 @LAPACKELIB@ ${LAPACK_LIBRARIES})
- -
- -unset(_LAPACKE_PREFIX)
- -unset(_LAPACKE_SELF_DIR)
- diff --git a/LAPACKE/cmake/lapacke-config-version.cmake.in b/LAPACKE/cmake/lapacke-config-version.cmake.in
- deleted file mode 100644
- --- a/LAPACKE/cmake/lapacke-config-version.cmake.in
- +++ /dev/null
- @@ -1,8 +0,0 @@
- -set(PACKAGE_VERSION "@LAPACK_VERSION@")
- -if(NOT ${PACKAGE_FIND_VERSION} VERSION_GREATER ${PACKAGE_VERSION})
- - set(PACKAGE_VERSION_COMPATIBLE 1)
- - if(${PACKAGE_FIND_VERSION} VERSION_EQUAL ${PACKAGE_VERSION})
- - set(PACKAGE_VERSION_EXACT 1)
- - endif()
- -endif()
- -
|