numeric-linalg
Educational material on the SciPy implementation of numerical linear algebra algorithms
Name | Size | Mode | |
.. | |||
lapack/CBLAS/CMakeLists.txt | 2783B | -rw-r--r-- |
01 02 03 04 05 06 07 08 09 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79
message(STATUS "CBLAS enabled") 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(CheckLanguage) check_language(Fortran) if(CMAKE_Fortran_COMPILER) enable_language(Fortran) include(FortranCInterface) ## Ensure that the fortran compiler and c compiler specified are compatible FortranCInterface_VERIFY() FortranCInterface_HEADER(${LAPACK_BINARY_DIR}/include/cblas_mangling.h MACRO_NAMESPACE "F77_" SYMBOL_NAMESPACE "F77_") # Check for any necessary platform specific compiler flags include(CheckLAPACKCompilerFlags) CheckLAPACKCompilerFlags() endif() if(NOT FortranCInterface_GLOBAL_FOUND OR NOT FortranCInterface_MODULE_FOUND) message(WARNING "Reverting to pre-defined include/cblas_mangling.h") configure_file(include/cblas_mangling_with_flags.h.in ${LAPACK_BINARY_DIR}/include/cblas_mangling.h) endif() include(CheckCSourceCompiles) check_c_source_compiles("int __attribute__((weak)) main() {};" HAS_ATTRIBUTE_WEAK_SUPPORT) include_directories(include ${LAPACK_BINARY_DIR}/include) add_subdirectory(include) add_subdirectory(src) macro(append_subdir_files variable dirname) get_directory_property(holder DIRECTORY ${dirname} DEFINITION ${variable}) foreach(depfile ${holder}) list(APPEND ${variable} "${dirname}/${depfile}") endforeach() endmacro() append_subdir_files(CBLAS_INCLUDE "include") install(FILES ${CBLAS_INCLUDE} ${LAPACK_BINARY_DIR}/include/cblas_mangling.h DESTINATION ${CMAKE_INSTALL_INCLUDEDIR} COMPONENT Development ) if(BUILD_TESTING) add_subdirectory(testing) add_subdirectory(examples) endif() configure_file(${CMAKE_CURRENT_SOURCE_DIR}/cblas.pc.in ${CMAKE_CURRENT_BINARY_DIR}/${CBLASLIB}.pc @ONLY) install(FILES ${CMAKE_CURRENT_BINARY_DIR}/${CBLASLIB}.pc 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 )