File: OpenBLASConfig.cmake.in

package info (click to toggle)
openblas 0.3.31%2Bds-3
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 64,028 kB
  • sloc: asm: 1,261,404; ansic: 424,394; fortran: 74,453; makefile: 13,985; sh: 4,935; perl: 4,582; python: 1,555; cpp: 244
file content (79 lines) | stat: -rw-r--r-- 2,919 bytes parent folder | download
1
2
3
4
5
6
7
8
9
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
# OpenBLASConfig.cmake
# --------------------
#
# OpenBLAS cmake module.
# This module sets the following variables in your project::
#
#   OpenBLAS_FOUND - true if OpenBLAS and all required components found on the system
#   OpenBLAS_VERSION - OpenBLAS version in format Major.Minor.Release
#   OpenBLAS_INCLUDE_DIRS - Directory where OpenBLAS header is located.
#   OpenBLAS_INCLUDE_DIR - same as DIRS
#   OpenBLAS_LIBRARIES - OpenBLAS library to link against.
#   OpenBLAS_LIBRARY - same as LIBRARIES
#
#
# Available components::
#
##   shared - search for only shared library
##   static - search for only static library
#   serial - search for unthreaded library
#   pthread - search for native pthread threaded library
#   openmp - search for OpenMP threaded library
#
#
# Exported targets::
#
# If OpenBLAS is found, this module defines the following :prop_tgt:`IMPORTED`
## target. Target is shared _or_ static, so, for both, use separate, not
## overlapping, installations. ::
#
#   OpenBLAS::OpenBLAS - the main OpenBLAS library #with header & defs attached.
#
#
# Suggested usage::
#
#   find_package(OpenBLAS)
#   find_package(OpenBLAS 0.2.20 EXACT CONFIG REQUIRED COMPONENTS pthread)
#
#
# The following variables can be set to guide the search for this package::
#
#   OpenBLAS_DIR - CMake variable, set to directory containing this Config file
#   CMAKE_PREFIX_PATH - CMake variable, set to root directory of this package
#   PATH - environment variable, set to bin directory of this package
#   CMAKE_DISABLE_FIND_PACKAGE_OpenBLAS - CMake variable, disables
#     find_package(OpenBLAS) when not REQUIRED, perhaps to force internal build

@PACKAGE_INIT@

set(PN OpenBLAS)

# need to check that the @USE_*@ evaluate to something cmake can perform boolean logic upon
if(@USE_OPENMP@)
    set(${PN}@SUFFIX64@_openmp_FOUND 1)
elseif(@USE_THREAD@)
    set(${PN}@SUFFIX64@_pthread_FOUND 1)
else()
    set(${PN}@SUFFIX64@_serial_FOUND 1)
endif()

check_required_components(${PN}@SUFFIX64@)

#-----------------------------------------------------------------------------
# Don't include targets if this file is being picked up by another
# project which has already built this as a subproject
#-----------------------------------------------------------------------------
if(NOT TARGET ${PN}@SUFFIX64@::OpenBLAS)
    include("${CMAKE_CURRENT_LIST_DIR}/${PN}@SUFFIX64@Targets.cmake")

    get_property(_loc TARGET ${PN}@SUFFIX64@::OpenBLAS PROPERTY LOCATION)
    set(${PN}@SUFFIX64@_LIBRARY ${_loc})
    get_property(_ill TARGET ${PN}@SUFFIX64@::OpenBLAS PROPERTY INTERFACE_LINK_LIBRARIES)
    set(${PN}@SUFFIX64@_LIBRARIES ${_ill})

    get_property(_id TARGET ${PN}@SUFFIX64@::OpenBLAS PROPERTY INCLUDE_DIRECTORIES)
    set(${PN}@SUFFIX64@_INCLUDE_DIR ${_id})
    get_property(_iid TARGET ${PN}@SUFFIX64@::OpenBLAS PROPERTY INTERFACE_INCLUDE_DIRECTORIES)
    set(${PN}@SUFFIX64@_INCLUDE_DIRS ${_iid})
endif()