This is an automated email from the ASF dual-hosted git repository. abukor pushed a commit to branch master in repository https://gitbox.apache.org/repos/asf/kudu.git
commit 8af7b881845125fd0a17f0cc81cc5e1bd04f3cc9 Author: Marton Greber <greber...@gmail.com> AuthorDate: Wed Apr 12 17:55:48 2023 +0000 [docs] Add ninja to make_site.sh If ninja is present on the system, use it to build Kudu. The command "rm -rf CMakeCache CMakeFiles/" clears the build folder incorrectly. Rather than CMakeCache one has to clear CMakeCache.txt, else cmake won't pick up the specified generator. (cmake error: Does not match the generator used previously) Change-Id: Ic3a5cb1252554c2f5ed137a6053376c435775e4b Reviewed-on: http://gerrit.cloudera.org:8080/19729 Tested-by: Kudu Jenkins Reviewed-by: Zoltan Chovan <zcho...@cloudera.com> Reviewed-by: Attila Bukor <abu...@apache.org> --- docs/support/scripts/make_site.sh | 13 +++++++++++-- 1 file changed, 11 insertions(+), 2 deletions(-) diff --git a/docs/support/scripts/make_site.sh b/docs/support/scripts/make_site.sh index 3adbe6f2d..e7ecc2ef0 100755 --- a/docs/support/scripts/make_site.sh +++ b/docs/support/scripts/make_site.sh @@ -81,12 +81,21 @@ echo "Successfully built third-party dependencies." # Build the binaries so we can auto-generate the command-line references mkdir -p "$BUILD_ROOT" cd "$BUILD_ROOT" -rm -rf CMakeCache CMakeFiles/ +rm -rf CMakeCache.txt CMakeFiles/ + +if command -v ninja &> /dev/null; then + CMAKE_GENERATOR="-GNinja" + BUILD_TOOL="ninja" +else + CMAKE_GENERATOR="" + BUILD_TOOL="make -j$(getconf _NPROCESSORS_ONLN)" +fi if [ -n "$OPT_DOXYGEN" ]; then DOXYGEN_FLAGS="-DDOXYGEN_WARN_AS_ERROR=1" fi $SOURCE_ROOT/build-support/enable_devtoolset.sh \ $SOURCE_ROOT/thirdparty/installed/common/bin/cmake \ + $CMAKE_GENERATOR \ -DNO_TESTS=1 \ -DCMAKE_BUILD_TYPE=$BUILD_TYPE \ $DOXYGEN_FLAGS \ @@ -95,7 +104,7 @@ MAKE_TARGETS="kudu kudu-tserver kudu-master" if [ -n "$OPT_DOXYGEN" ]; then MAKE_TARGETS="$MAKE_TARGETS doxygen" fi -make -j$(getconf _NPROCESSORS_ONLN) $MAKE_TARGETS +$BUILD_TOOL $MAKE_TARGETS # Check out the gh-pages repo into $SITE_OUTPUT_DIR if [ -d "$SITE_OUTPUT_DIR" -a -n "$OPT_FORCE" ]; then