This is an automated email from the ASF dual-hosted git repository.

wesm pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/arrow.git


The following commit(s) were added to refs/heads/master by this push:
     new 9428b86  ARROW-3064: [C++] Add option to ADD_ARROW_TEST to indicate 
additional dependencies for particular unit test executables
9428b86 is described below

commit 9428b86520498e4f3aa6889e4a79673b2cb46406
Author: Lukasz A. Bartnik <[email protected]>
AuthorDate: Thu Aug 16 16:43:56 2018 -0400

    ARROW-3064: [C++] Add option to ADD_ARROW_TEST to indicate additional 
dependencies for particular unit test executables
    
    Author: Lukasz Bartnik <[email protected]>
    
    Author: Lukasz A. Bartnik <[email protected]>
    
    Closes #2439 from lbartnik/fix-3064 and squashes the following commits:
    
    56392e35 <Lukasz A. Bartnik> new argument for ADD_ARROW_TEST
---
 cpp/cmake_modules/BuildUtils.cmake | 9 +++++++--
 1 file changed, 7 insertions(+), 2 deletions(-)

diff --git a/cpp/cmake_modules/BuildUtils.cmake 
b/cpp/cmake_modules/BuildUtils.cmake
index 95bb4c9..95eadad 100644
--- a/cpp/cmake_modules/BuildUtils.cmake
+++ b/cpp/cmake_modules/BuildUtils.cmake
@@ -307,8 +307,8 @@ endfunction()
 # Arguments after the test name will be passed to set_tests_properties().
 function(ADD_ARROW_TEST REL_TEST_NAME)
   set(options NO_VALGRIND)
-  set(single_value_args)
-  set(multi_value_args STATIC_LINK_LIBS EXTRA_LINK_LIBS EXTRA_INCLUDES LABELS)
+  set(one_value_args)
+  set(multi_value_args STATIC_LINK_LIBS EXTRA_LINK_LIBS EXTRA_INCLUDES 
EXTRA_DEPENDENCIES LABELS)
   cmake_parse_arguments(ARG "${options}" "${one_value_args}" 
"${multi_value_args}" ${ARGN})
   if(ARG_UNPARSED_ARGUMENTS)
     message(SEND_ERROR "Error: unrecognized arguments: 
${ARG_UNPARSED_ARGUMENTS}")
@@ -352,6 +352,11 @@ function(ADD_ARROW_TEST REL_TEST_NAME)
         ${ARG_EXTRA_INCLUDES}
         )
     endif()
+
+    if (ARG_EXTRA_DEPENDENCIES)
+      add_dependencies(${TEST_NAME} ${ARG_EXTRA_DEPENDENCIES})
+    endif()
+
     add_dependencies(unittest ${TEST_NAME})
   else()
     # No executable, just invoke the test (probably a script) directly.

Reply via email to