Repository: incubator-impala
Updated Branches:
  refs/heads/master 113526198 -> 244c1fba6


IMPALA-5846: Fix output path for kudu libraries

Prior to this patch, libraries and executables built using
ADD_EXPORTABLE_LIBRARY (i.e. those built from be/src/kudu) were placed
in their source directory - not in be/build/<etc>.

The problem appears to be related to how LIBRARY_OUTPUT_PATH was set by
ADD_EXPORTABLE_LIBRARY. I confess I don't completely understand the bug,
but this more idiomatic (and clear, IMHO) way of setting the output dirs
has the expected behaviour.

Change-Id: I73f3dd5435bceb35bc929ff6d5f2c92300e2a1d2
Reviewed-on: http://gerrit.cloudera.org:8080/7818
Reviewed-by: Tim Armstrong <[email protected]>
Tested-by: Impala Public Jenkins


Project: http://git-wip-us.apache.org/repos/asf/incubator-impala/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-impala/commit/f20b1626
Tree: http://git-wip-us.apache.org/repos/asf/incubator-impala/tree/f20b1626
Diff: http://git-wip-us.apache.org/repos/asf/incubator-impala/diff/f20b1626

Branch: refs/heads/master
Commit: f20b1626b8bdf2a87e089cb18f82cd80a7cc981c
Parents: 1135261
Author: Henry Robinson <[email protected]>
Authored: Thu Aug 24 15:27:38 2017 -0700
Committer: Impala Public Jenkins <[email protected]>
Committed: Sat Aug 26 01:44:26 2017 +0000

----------------------------------------------------------------------
 cmake_modules/kudu_cmake_fns.txt | 9 ++++++---
 1 file changed, 6 insertions(+), 3 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-impala/blob/f20b1626/cmake_modules/kudu_cmake_fns.txt
----------------------------------------------------------------------
diff --git a/cmake_modules/kudu_cmake_fns.txt b/cmake_modules/kudu_cmake_fns.txt
index 6f27081..20e281d 100644
--- a/cmake_modules/kudu_cmake_fns.txt
+++ b/cmake_modules/kudu_cmake_fns.txt
@@ -51,10 +51,13 @@ function(ADD_EXPORTABLE_LIBRARY LIB_NAME)
     message(SEND_ERROR "Error: unrecognized arguments: 
${ARG_UNPARSED_ARGUMENTS}")
   endif()
 
-  set(LIBRARY_OUTPUT_PATH "${BUILD_OUTPUT_ROOT_DIRECTORY}/${LIB_NAME}")
-  set(EXECUTABLE_OUTPUT_PATH "${BUILD_OUTPUT_ROOT_DIRECTORY}/${LIB_NAME}")
-
   add_library(${LIB_NAME} ${ARG_SRCS})
+
+  set_target_properties(${LIB_NAME} PROPERTIES
+    ARCHIVE_OUTPUT_DIRECTORY "${BUILD_OUTPUT_ROOT_DIRECTORY}/${LIB_NAME}"
+    LIBRARY_OUTPUT_DIRECTORY "${BUILD_OUTPUT_ROOT_DIRECTORY}/${LIB_NAME}"
+    EXECUTABLE_OUTPUT_DIRECTORY "${BUILD_OUTPUT_ROOT_DIRECTORY}/${LIB_NAME}")
+
   if(ARG_COMPILE_FLAGS)
     set_target_properties(${LIB_NAME}
       PROPERTIES COMPILE_FLAGS ${ARG_COMPILE_FLAGS})

Reply via email to