[clfft] 50/109: Update to the cmake script to copy dependencies into packages This should make the logic more robust in windows

Jérôme Kieffer kieffer-guest at moszumanska.debian.org
Wed May 20 07:29:26 UTC 2015


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

kieffer-guest pushed a commit to branch debian
in repository clfft.

commit ee5da40d949f3858af3ff3757c0c31094bcaacee
Author: Kent Knox <kent.knox at amd>
Date:   Tue Apr 1 13:53:38 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 | 46 +++++++++++++++++++++++----------
 1 file changed, 33 insertions(+), 13 deletions(-)

diff --git a/src/tests/copyTestDependencies.cmake.in b/src/tests/copyTestDependencies.cmake.in
index e4f24a6..2c5e447 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,27 +31,49 @@ endif( )
 # Only search for dependencies that have ROOT defined
 set( depList "" )
 
-if( EXISTS "@FFTW_ROOT@" )
-    list( APPEND depList "@FFTW_ROOT@/lib at SUFFIX_LIB@" )
+#This logic assumes that FindFFTW.cmake has been called
+get_filename_component( fftwDirSingle "@FFTW_SINGLE_PRECISION_LIBRARIES@" DIRECTORY )
+get_filename_component( fftwDirDouble "@FFTW_DOUBLE_PRECISION_LIBRARIES@" DIRECTORY )
+
+if( EXISTS "${fftwDirSingle}" )
+    list( APPEND depList "${fftwDirSingle}" )
+#    message( "fftwDirSingle: ${fftwDirSingle}" )
+endif( )
+
+string( COMPARE NOTEQUAL "${fftwDirSingle}" "${fftwDirDouble}" fftwDiffDirs )
+if( ${fftwDiffDirs} AND EXISTS "${fftwDirDouble}" )
+    list( APPEND depList "${fftwDirDouble}" )
+#    message( "fftwDirDouble: ${fftwDirDouble}" )
+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}" )
     list( APPEND depList "${testDir}" )
 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/clfft.git



More information about the debian-science-commits mailing list