Skip to content

Commit

Permalink
IMPALA-10226: Change buildall.sh -notests to invoke a single Make target
Browse files Browse the repository at this point in the history
This is a small cleanup to add specific targets in CMake for
buildall.sh -notests to invoke. Previously, it ran multiple
targets like:
make target1 target2 target3 ...
In hand tests, make builds each target separately, so it is
unable to overlap the builds of the multiple targets. Pushing
it into CMake simplifies the code and allows the targets to
build simultaneously.

Testing:
 - Ran buildall.sh -notests

Change-Id: Id881d6f481b32ba82501b16bada14b6630ba32d2
Reviewed-on: http://gerrit.cloudera.org:8080/16605
Reviewed-by: Tim Armstrong <tarmstrong@cloudera.com>
Tested-by: Impala Public Jenkins <impala-public-jenkins@cloudera.com>
  • Loading branch information
joemcdonnell committed Oct 19, 2020
1 parent c7f118a commit e76010d
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 4 deletions.
11 changes: 11 additions & 0 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -448,6 +448,17 @@ add_custom_target(cscope ALL DEPENDS gen-deps
COMMAND "${CMAKE_SOURCE_DIR}/bin/gen-cscope.sh"
)

add_custom_target(notests_independent_targets DEPENDS
java cscope tarballs
)
add_custom_target(notests_regular_targets DEPENDS
impalad statestored catalogd fesupport loggingsupport ImpalaUdf udasample udfsample
)

add_custom_target(notests_all_targets DEPENDS
notests_independent_targets notests_regular_targets
)

# Dump include paths to a file
if (DUMP_INCLUDE_PATHS)
file(REMOVE "${DUMP_INCLUDE_PATHS}")
Expand Down
7 changes: 3 additions & 4 deletions buildall.sh
Original file line number Diff line number Diff line change
Expand Up @@ -445,11 +445,10 @@ build_all_components() {
# If we skip specifying targets, everything we need gets built.
local MAKE_TARGETS=""
if [[ $BUILD_TESTS -eq 0 ]]; then
# Specify all the non-test targets
MAKE_TARGETS="impalad statestored catalogd fesupport loggingsupport ImpalaUdf \
udasample udfsample"
if (( build_independent_targets )); then
MAKE_TARGETS+=" cscope java tarballs"
MAKE_TARGETS="notests_all_targets"
else
MAKE_TARGETS="notests_regular_targets"
fi
fi
${MAKE_CMD} -j${IMPALA_BUILD_THREADS:-4} ${IMPALA_MAKE_FLAGS} ${MAKE_TARGETS}
Expand Down

0 comments on commit e76010d

Please sign in to comment.