You can not select more than 25 topics Topics must start with a chinese character,a letter or number, can include dashes ('-') and can be up to 35 characters long.

OpenBLASConfig.cmake.in 2.8 kB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879
  1. # OpenBLASConfig.cmake
  2. # --------------------
  3. #
  4. # OpenBLAS cmake module.
  5. # This module sets the following variables in your project::
  6. #
  7. # OpenBLAS_FOUND - true if OpenBLAS and all required components found on the system
  8. # OpenBLAS_VERSION - OpenBLAS version in format Major.Minor.Release
  9. # OpenBLAS_INCLUDE_DIRS - Directory where OpenBLAS header is located.
  10. # OpenBLAS_INCLUDE_DIR - same as DIRS
  11. # OpenBLAS_LIBRARIES - OpenBLAS library to link against.
  12. # OpenBLAS_LIBRARY - same as LIBRARIES
  13. #
  14. #
  15. # Available components::
  16. #
  17. ## shared - search for only shared library
  18. ## static - search for only static library
  19. # serial - search for unthreaded library
  20. # pthread - search for native pthread threaded library
  21. # openmp - search for OpenMP threaded library
  22. #
  23. #
  24. # Exported targets::
  25. #
  26. # If OpenBLAS is found, this module defines the following :prop_tgt:`IMPORTED`
  27. ## target. Target is shared _or_ static, so, for both, use separate, not
  28. ## overlapping, installations. ::
  29. #
  30. # OpenBLAS::OpenBLAS - the main OpenBLAS library #with header & defs attached.
  31. #
  32. #
  33. # Suggested usage::
  34. #
  35. # find_package(OpenBLAS)
  36. # find_package(OpenBLAS 0.2.20 EXACT CONFIG REQUIRED COMPONENTS pthread)
  37. #
  38. #
  39. # The following variables can be set to guide the search for this package::
  40. #
  41. # OpenBLAS_DIR - CMake variable, set to directory containing this Config file
  42. # CMAKE_PREFIX_PATH - CMake variable, set to root directory of this package
  43. # PATH - environment variable, set to bin directory of this package
  44. # CMAKE_DISABLE_FIND_PACKAGE_OpenBLAS - CMake variable, disables
  45. # find_package(OpenBLAS) when not REQUIRED, perhaps to force internal build
  46. @PACKAGE_INIT@
  47. set(PN OpenBLAS)
  48. # need to check that the @USE_*@ evaluate to something cmake can perform boolean logic upon
  49. if(@USE_OPENMP@)
  50. set(${PN}_openmp_FOUND 1)
  51. elseif(@USE_THREAD@)
  52. set(${PN}_pthread_FOUND 1)
  53. else()
  54. set(${PN}_serial_FOUND 1)
  55. endif()
  56. check_required_components(${PN})
  57. #-----------------------------------------------------------------------------
  58. # Don't include targets if this file is being picked up by another
  59. # project which has already built this as a subproject
  60. #-----------------------------------------------------------------------------
  61. if(NOT TARGET ${PN}::OpenBLAS)
  62. include("${CMAKE_CURRENT_LIST_DIR}/${PN}Targets.cmake")
  63. get_property(_loc TARGET ${PN}::OpenBLAS PROPERTY LOCATION)
  64. set(${PN}_LIBRARY ${_loc})
  65. get_property(_ill TARGET ${PN}::OpenBLAS PROPERTY INTERFACE_LINK_LIBRARIES)
  66. set(${PN}_LIBRARIES ${_ill})
  67. get_property(_id TARGET ${PN}::OpenBLAS PROPERTY INCLUDE_DIRECTORIES)
  68. set(${PN}_INCLUDE_DIR ${_id})
  69. get_property(_iid TARGET ${PN}::OpenBLAS PROPERTY INTERFACE_INCLUDE_DIRECTORIES)
  70. set(${PN}_INCLUDE_DIRS ${_iid})
  71. endif()