[mlpack-svn] r10795 - mlpack/trunk/src/mlpack/tests

fastlab-svn at coffeetalk-1.cc.gatech.edu fastlab-svn at coffeetalk-1.cc.gatech.edu
Wed Dec 14 12:58:43 EST 2011


Author: rcurtin
Date: 2011-12-14 12:58:43 -0500 (Wed, 14 Dec 2011)
New Revision: 10795

Modified:
   mlpack/trunk/src/mlpack/tests/CMakeLists.txt
Log:
Copy test data to the right place after building the test.


Modified: mlpack/trunk/src/mlpack/tests/CMakeLists.txt
===================================================================
--- mlpack/trunk/src/mlpack/tests/CMakeLists.txt	2011-12-14 17:52:34 UTC (rev 10794)
+++ mlpack/trunk/src/mlpack/tests/CMakeLists.txt	2011-12-14 17:58:43 UTC (rev 10795)
@@ -1,15 +1,6 @@
 cmake_minimum_required(VERSION 2.8)
 
-# add directory name to sources
-set(DIR_SRCS)
-foreach(file ${SOURCES})
-  set(DIR_SRCS ${DIR_SRCS} ${CMAKE_CURRENT_SOURCE_DIR}/${file})
-endforeach()
-# Append sources (with directory name) to list of all MLPACK sources (used at
-# the parent scope).
-set(MLPACK_SRCS ${MLPACK_SRCS} ${DIR_SRCS} PARENT_SCOPE)
-
-# test executable
+# MLPACK test executable.
 add_executable(mlpack_test
   mlpack_test.cpp
   allkfn_test.cpp
@@ -36,8 +27,14 @@
   tree_test.cpp
   union_find_test.cpp
 )
-# link dependencies of test executable
+# Link dependencies of test executable.
 target_link_libraries(mlpack_test
   mlpack
   boost_unit_test_framework
 )
+
+# Copy test data into right place.
+add_custom_command(TARGET mlpack_test
+  POST_BUILD
+  COMMAND ${CMAKE_COMMAND} -E copy_directory ${CMAKE_CURRENT_SOURCE_DIR}/data/ ${PROJECT_BINARY_DIR}
+)




More information about the mlpack-svn mailing list