[clblas] 34/61: added test for OSX detection to turn off CORR_TEST_WITH_ACML, refactored CMakeLists.txt in BUILD_TEST block

Ghislain Vaillant ghisvail-guest at moszumanska.debian.org
Fri Jul 24 22:49:46 UTC 2015


This is an automated email from the git hooks/post-receive script.

ghisvail-guest pushed a commit to branch master
in repository clblas.

commit 46389ac451d9fb899c12708ac5c94b9adcf8df90
Author: Lee Zamparo <zamparo at gmail.com>
Date:   Wed May 13 20:44:52 2015 -0400

    added test for OSX detection to turn off CORR_TEST_WITH_ACML, refactored CMakeLists.txt in BUILD_TEST block
---
 src/CMakeLists.txt | 16 +++++++++++-----
 1 file changed, 11 insertions(+), 5 deletions(-)

diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt
index 52c9d87..d84473b 100644
--- a/src/CMakeLists.txt
+++ b/src/CMakeLists.txt
@@ -75,7 +75,13 @@ message( STATUS "You have confirmed OpenCL ${OCL_VERSION} is supported in your s
 
 # By default test-correctness is linked and tested against ACML library.
 # However, test-correctness can instead use NETLIB as a reference library
-set(CORR_TEST_WITH_ACML ON CACHE BOOL "Use ACML library in correctness tests")
+# On Mac OSX systems, this must be set to OFF for the build to succeed (due to nesting of FindBLAS code)
+if ( APPLE )
+	set(CORR_TEST_WITH_ACML OFF CACHE BOOL "Use ACML library in correctness tests")
+else ( )
+	message(STATUS "CORR_TEST_WITH_ACML set to ON")
+	set(CORR_TEST_WITH_ACML ON CACHE BOOL "Use ACML library in correctness tests")
+endif( )
 
 if( CMAKE_GENERATOR MATCHES "NMake" )
   option( NMAKE_COMPILE_VERBOSE "Print compile and link strings to the console" OFF )
@@ -183,13 +189,13 @@ endif()
 # TODO: maybe this could be written using the FindBLAS module in the future
 if( BUILD_TEST )
 	if(NOT CORR_TEST_WITH_ACML)
-	        if(APPLE)
-			find_library(BLAS_LIBRARIES Accelerate)
+	    if(APPLE)
+			find_library(BLAS_LIBRARIES Accelerate HINTS /System/Library/Frameworks/Accelerate.framework)
 		       	MARK_AS_ADVANCED(BLAS_LIBRARIES)
 		       	message(STATUS "Using Accelerate framework on Mac OS-X")
-	       	else()
+	    else()
 			find_package( Netlib COMPONENTS BLAS REQUIRED )
-              	endif()
+        endif()
 	else( )
 		# Find ACML BLAS implementation
 		# platform dependent ACML subdirectory

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/debian-science/packages/clblas.git



More information about the debian-science-commits mailing list