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 ef9ccbb  ARROW-3206: [C++] Fix CMake error when ARROW_HIVESERVER2=ON 
but tests disabled
ef9ccbb is described below

commit ef9ccbbda2e9743868d1538d963737344c0de2e4
Author: Wes McKinney <[email protected]>
AuthorDate: Mon Oct 1 07:59:07 2018 -0400

    ARROW-3206: [C++] Fix CMake error when ARROW_HIVESERVER2=ON but tests 
disabled
    
    Also add HS2 libraries to arrow_hiveserver2 target so `make 
arrow_hiveserver2` works
    
    Author: Wes McKinney <[email protected]>
    
    Closes #2671 from wesm/ARROW-3206 and squashes the following commits:
    
    3a16fef69 <Wes McKinney> Do not fail to run CMake when ARROW_HIVESERVER2=ON 
but tests disabled. Add HS2 libraries to arrow_hiveserver2 target
---
 cpp/src/arrow/dbi/hiveserver2/CMakeLists.txt | 19 +++++++++++--------
 1 file changed, 11 insertions(+), 8 deletions(-)

diff --git a/cpp/src/arrow/dbi/hiveserver2/CMakeLists.txt 
b/cpp/src/arrow/dbi/hiveserver2/CMakeLists.txt
index ddeb26f..ba2634b 100644
--- a/cpp/src/arrow/dbi/hiveserver2/CMakeLists.txt
+++ b/cpp/src/arrow/dbi/hiveserver2/CMakeLists.txt
@@ -93,6 +93,8 @@ ADD_ARROW_LIB(arrow_hiveserver2
   SHARED_LINK_LIBS ${ARROW_PYTHON_SHARED_LINK_LIBS}
 )
 
+add_dependencies(arrow_hiveserver2 ${ARROW_HIVESERVER2_LIBRARIES})
+
 foreach(LIB_TARGET ${ARROW_HIVESERVER2_LIBRARIES})
   target_compile_definitions(${LIB_TARGET}
     PRIVATE ARROW_EXPORTING)
@@ -108,11 +110,12 @@ set(ARROW_HIVESERVER2_TEST_LINK_LIBS
   arrow_hiveserver2_thrift
   thriftstatic)
 
-ADD_ARROW_TEST(hiveserver2-test
-  STATIC_LINK_LIBS "${ARROW_HIVESERVER2_TEST_LINK_LIBS}"
-  LABELS "arrow_hiveserver2"
-)
-
-set_property(TARGET hiveserver2-test
-  APPEND_STRING PROPERTY COMPILE_FLAGS
-  " -Wno-shadow-field")
+if (ARROW_BUILD_TESTS)
+  ADD_ARROW_TEST(hiveserver2-test
+    STATIC_LINK_LIBS "${ARROW_HIVESERVER2_TEST_LINK_LIBS}"
+    LABELS "arrow_hiveserver2"
+  )
+  set_property(TARGET hiveserver2-test
+    APPEND_STRING PROPERTY COMPILE_FLAGS
+    " -Wno-shadow-field")
+endif(ARROW_BUILD_TESTS)

Reply via email to