[clblas] 64/125: Update to the cmake script to copy dependencies into packages This should make the logic more robust in windows

Ghislain Vaillant ghisvail-guest at moszumanska.debian.org
Fri May 29 06:57:23 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 d910be6385f807838217a6d71ceedd292c9fa0f4
Author: Kent Knox <kent.knox at amd>
Date:   Tue Apr 1 13:52:10 2014 -0500

    Update to the cmake script to copy dependencies into packages
    This should make the logic more robust in windows
---
 src/tests/copyTestDependencies.cmake.in | 39 ++++++++++++++++++++++-----------
 1 file changed, 26 insertions(+), 13 deletions(-)

diff --git a/src/tests/copyTestDependencies.cmake.in b/src/tests/copyTestDependencies.cmake.in
index e42ddb8..5da7127 100644
--- a/src/tests/copyTestDependencies.cmake.in
+++ b/src/tests/copyTestDependencies.cmake.in
@@ -18,9 +18,7 @@ endif( )
 
 #    message( fixedTestLocation ": ${fixedTestLocation}" )
 # Get the directory that the test executable resides in; this helps get_prerequisites( ) find dependent libraries
-get_filename_component( testName "${fixedTestLocation}" NAME )
-string( REPLACE ${testName} "" testDir ${fixedTestLocation} )
-string( REGEX REPLACE "/+$" "" testDir ${testDir} )
+get_filename_component( testDir "${fixedTestLocation}" DIRECTORY )
 #    message( testDir ": ${testDir}" )
 
 set( installPath "" )
@@ -33,20 +31,35 @@ endif( )
 # Only search for dependencies that have ROOT defined
 set( depList "" )
 
-if( EXISTS "@ACML_ROOT@" )
-    list( APPEND depList "@ACML_ROOT@/@ACML_SUBDIR@/lib" )
+#This logic assumes that clBLAS CMakeLists.txt has been called
+get_filename_component( acmlDir "@ACML_LIBRARIES@" DIRECTORY )
+
+if( EXISTS "${acmlDir}" )
+    list( APPEND depList "${acmlDir}" )
+#    message( "acmlDir: ${acmlDir}" )
+endif( )
+
+#This logic assumes that FindGTest.cmake has been called
+get_filename_component( gtestDir "@GTEST_LIBRARY@" DIRECTORY )
+get_filename_component( gtestDirDebug "@GTEST_LIBRARY_DEBUG@" DIRECTORY )
+
+if( EXISTS "${gtestDir}" )
+    list( APPEND depList "${gtestDir}" )
+#    message( "gtestDir: ${gtestDir}" )
 endif( )
 
-if( EXISTS "@GTEST_ROOT@" )
-    list( APPEND depList "@GTEST_ROOT@/lib at SUFFIX_LIB@" )
+string( COMPARE NOTEQUAL "${gtestDir}" "${gtestDirDebug}" gtestDiffDirs )
+if( ${gtestDiffDirs} AND EXISTS "${gtestDirDebug}" )
+    list( APPEND depList "${gtestDirDebug}" )
+#    message( "gtestDirDebug: ${gtestDirDebug}" )
 endif( )
 
-if( EXISTS "@OPENCL_LIBRARIES@" )
-    get_filename_component( clLibName "@OPENCL_LIBRARIES@" NAME )
-    string( REPLACE ${clLibName} "" clLibDir "@OPENCL_LIBRARIES@" )
-    string( REGEX REPLACE "/+$" "" clLibDir ${clLibDir} )
+#This logic assumes that FindOpenCL.cmake has been called
+get_filename_component( openclDir "@OPENCL_LIBRARIES@" DIRECTORY )
 
-    list( APPEND depList "${clLibDir}" )
+if( EXISTS "${openclDir}" )
+    list( APPEND depList "${openclDir}" )
+#    message( "openclDir: ${openclDir}" )
 endif( )
  
 if( EXISTS "${testDir}" )
@@ -57,7 +70,7 @@ if( EXISTS "${testDir}" )
     endif( )
 endif( )
 
-# message( STATUS "depList: ${depList}" )
+# message( "depList: ${depList}" )
 
 # This retrieves a list of shared library dependencies from the target; they are not full path names
 # Skip system dependencies and skip recursion

-- 
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