Debian Codegraph @

cmake/modules/FindBLASHeader.cmake

raw
1 # - Try to find BLAS header cblas.h
2 # Once done this will define
3 #
4 # BLASHEADER_FOUND - system has BLAS
5 # BLAS_INCLUDE_DIRS - include directories for BLAS
6 #
7
8 #=============================================================================
9 # Copyright (C) 2010 Garth N. Wells
10 # All rights reserved.
11 #
12 # Redistribution and use in source and binary forms, with or without
13 # modification, are permitted provided that the following conditions
14 # are met:
15 #
16 # 1. Redistributions of source code must retain the above copyright
17 # notice, this list of conditions and the following disclaimer.
18 # 2. Redistributions in binary form must reproduce the above copyright
19 # notice, this list of conditions and the following disclaimer in
20 # the documentation and/or other materials provided with the
21 # distribution.
22 #
23 # THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
24 # "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
25 # LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
26 # FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
27 # COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
28 # INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
29 # BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
30 # LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
31 # CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
32 # LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN
33 # ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
34 # POSSIBILITY OF SUCH DAMAGE.
35 #=============================================================================
36
37 message(STATUS "Checking for package 'BLAS'")
38
39 # Check for header file
40 find_path(BLASHEADER_INCLUDE_DIRS cblas.h
41 HINTS ${BLASHEADER_DIR}/include $ENV{BLASHEADER_DIR}/include
42 DOC "Directory where the BLAS header is located"
43 )
44 mark_as_advanced(BLASBLASHEADER_INCLUDE_DIRS)
45
46 # Standard package handling
47 include(FindPackageHandleStandardArgs)
48 find_package_handle_standard_args(BLASHEADER
49 "BLAS C header could not be found. Be sure to set BLASHEADER_DIR."
50 BLASHEADER_INCLUDE_DIRS)