try cblas test on osx

This commit is contained in:
Radovan Bast 2015-09-17 00:45:44 +02:00
parent b92b9ae23c
commit 8d81310cc6
3 changed files with 13 additions and 6 deletions

View File

@ -65,12 +65,16 @@ if(ENABLE_CBLAS)
endfunction() endfunction()
set(CBLAS_FOUND FALSE) set(CBLAS_FOUND FALSE)
set(CBLAS_INCLUDE_DIR "undefined")
_find_include_dir(cblas.h /usr CBLAS_INCLUDE_DIR)
set(CBLAS_LIBRARIES "undefined") set(CBLAS_LIBRARIES "undefined")
_find_library(cblas cblas_dgemm CBLAS_LIBRARIES) set(CBLAS_INCLUDE_DIR "undefined")
if(APPLE)
_find_include_dir(Accelerate/Accelerate.h /usr CBLAS_INCLUDE_DIR)
_find_library(Accelerate cblas_dgemm CBLAS_LIBRARIES)
else()
_find_include_dir(cblas.h /usr CBLAS_INCLUDE_DIR)
_find_library(cblas cblas_dgemm CBLAS_LIBRARIES)
endif()
if(NOT ${CBLAS_INCLUDE_DIR} STREQUAL "undefined" AND NOT ${CBLAS_LIBRARIES} STREQUAL "undefined") if(NOT ${CBLAS_INCLUDE_DIR} STREQUAL "undefined" AND NOT ${CBLAS_LIBRARIES} STREQUAL "undefined")
set(CBLAS_FOUND TRUE) set(CBLAS_FOUND TRUE)

View File

@ -1,7 +1,11 @@
#include <stdio.h> #include <stdio.h>
#include <stdlib.h> #include <stdlib.h>
#ifdef __APPLE__
#include "Accelerate/Accelerate.h"
#else
#include "cblas.h" #include "cblas.h"
#endif
int main() int main()
{ {

View File

@ -169,7 +169,6 @@ def test_fc_blas_static():
configure_build_and_exe('fc_blas', 'python setup.py --fc=gfortran --static --cmake-options="-DMATH_LIB_SEARCH_ORDER=\'OPENBLAS;ATLAS;MKL;SYSTEM_NATIVE\'"') configure_build_and_exe('fc_blas', 'python setup.py --fc=gfortran --static --cmake-options="-DMATH_LIB_SEARCH_ORDER=\'OPENBLAS;ATLAS;MKL;SYSTEM_NATIVE\'"')
@skip_on_osx
def test_cxx_cblas(): def test_cxx_cblas():
configure_build_and_exe('cxx_cblas', 'python setup.py --cxx=g++ --cblas') configure_build_and_exe('cxx_cblas', 'python setup.py --cxx=g++ --cblas')