3 #All contributions by the University of California:
4 #Copyright (c) 2014, 2015, The Regents of the University of California (Regents)
7 #All other contributions:
8 #Copyright (c) 2014, 2015, the respective contributors
11 #Caffe uses a shared copyright model: each contributor holds copyright over
12 #their contributions to Caffe. The project versioning records all such
13 #contribution and copyright details. If a contributor wants to further mark
14 #their specific copyright on a particular contribution, they should indicate
15 #their copyright solely in the commit message of the change when it is
20 #Redistribution and use in source and binary forms, with or without
21 #modification, are permitted provided that the following conditions are met:
23 #1. Redistributions of source code must retain the above copyright notice, this
24 # list of conditions and the following disclaimer.
25 #2. Redistributions in binary form must reproduce the above copyright notice,
26 # this list of conditions and the following disclaimer in the documentation
27 # and/or other materials provided with the distribution.
29 #THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
30 #ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
31 #WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
32 #DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR
33 #ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
34 #(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
35 #LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
36 #ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
37 #(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
38 #SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
40 #CONTRIBUTION AGREEMENT
42 #By contributing to the BVLC/caffe repository through pull-request, comment,
43 #or otherwise, the contributor releases their content to the
44 #license and copyright terms herein.
46 SET(Open_BLAS_INCLUDE_SEARCH_PATHS
48 $ENV{OpenBLAS_HOME}/include
50 /usr/local/include/openblas
52 /usr/local/include/openblas-base
53 /usr/include/openblas-base
58 SET(Open_BLAS_LIB_SEARCH_PATHS
62 $ENV{OpenBLAS_HOME}/lib
69 /usr/lib/openblas-base
74 FIND_PATH(OpenBLAS_INCLUDE_DIR NAMES cblas.h PATHS ${Open_BLAS_INCLUDE_SEARCH_PATHS} NO_DEFAULT_PATH)
75 FIND_LIBRARY(OpenBLAS_LIB NAMES openblas PATHS ${Open_BLAS_LIB_SEARCH_PATHS} NO_DEFAULT_PATH)
77 SET(OpenBLAS_FOUND ON)
80 IF(NOT OpenBLAS_INCLUDE_DIR)
81 SET(OpenBLAS_FOUND OFF)
82 MESSAGE(STATUS "Could not find OpenBLAS include. Turning OpenBLAS_FOUND off")
87 SET(OpenBLAS_FOUND OFF)
88 MESSAGE(STATUS "Could not find OpenBLAS lib. Turning OpenBLAS_FOUND off")
92 IF (NOT OpenBLAS_FIND_QUIETLY)
93 MESSAGE(STATUS "Found OpenBLAS libraries: ${OpenBLAS_LIB}")
94 MESSAGE(STATUS "Found OpenBLAS include: ${OpenBLAS_INCLUDE_DIR}")
95 ENDIF (NOT OpenBLAS_FIND_QUIETLY)
97 IF (OpenBLAS_FIND_REQUIRED)
98 MESSAGE(FATAL_ERROR "Could not find OpenBLAS")
99 ENDIF (OpenBLAS_FIND_REQUIRED)
100 ENDIF (OpenBLAS_FOUND)