@@ -19,7 +19,7 @@ ARGS=$*
1919# scripts, and that this script resides in the repo dir!
2020REPODIR=$( cd " $( dirname " $0 " ) " ; pwd)
2121
22- VALIDARGS=" clean libcuvs python rust go java lucene docs tests bench-ann examples --uninstall -v -g -n --allgpuarch --no-mg --mnmg-tests --no-cpu --cpu-only --no-shared-libs --no-nvtx --show_depr_warn --incl-cache-stats --time -h --run-java-tests"
22+ VALIDARGS=" clean libcuvs python rust go java lucene docs tests bench-ann examples --uninstall -v -g -n --allgpuarch --no-mg --mnmg-tests --no-cpu --cpu-only --no-shared-libs --no-nvtx --show_depr_warn --incl-cache-stats --time -h --run-java-tests --build-java-examples "
2323HELP=" $0 [<target> ...] [<flag> ...] [--cmake-args=\" <args>\" ] [--cache-tool=<tool>] [--limit-tests=<targets>] [--limit-bench-ann=<targets>] [--build-metrics=<filename>]
2424 where <target> is:
2525 clean - remove all existing build artifacts and configuration (start over)
@@ -57,6 +57,8 @@ HELP="$0 [<target> ...] [<flag> ...] [--cmake-args=\"<args>\"] [--cache-tool=<to
5757 --no-shared-libs - build without shared libraries
5858 --show_depr_warn - show cmake deprecation warnings
5959 --run-java-tests - run Java tests after building
60+ --build-java-examples - also build the examples/java/cuvs-java and examples/java/cuvs-lucene
61+ projects against the jars just built (with the 'java'/'lucene' targets)
6062 --build-metrics - filename for generating build metrics report for libcuvs
6163 --incl-cache-stats - include cache statistics in build metrics report
6264 --cmake-args=\\\" <args>\\\" - pass arbitrary list of CMake configuration options (escape all quotes in argument)
@@ -560,11 +562,14 @@ if (( NUMARGS == 0 )) || hasArg java; then
560562 echo " Please add 'libcuvs' to this script's arguments (ex. './build.sh libcuvs java') if libcuvs libraries are not already built"
561563 fi
562564 cd " ${REPODIR} " /java
565+ JAVA_BUILD_ARGS=()
563566 if hasArg --run-java-tests; then
564- ./build.sh --run-java-tests
565- else
566- ./build.sh
567+ JAVA_BUILD_ARGS+=(" --run-java-tests" )
567568 fi
569+ if hasArg --build-java-examples; then
570+ JAVA_BUILD_ARGS+=(" --build-java-examples" )
571+ fi
572+ ./build.sh " ${JAVA_BUILD_ARGS[@]} "
568573fi
569574
570575# Build the cuvs-lucene codecs
@@ -573,11 +578,14 @@ if (( NUMARGS == 0 )) || hasArg lucene; then
573578 echo " Please add 'java' to this script's arguments (ex. './build.sh libcuvs java lucene') if the cuvs Java bindings are not already built"
574579 fi
575580 cd " ${REPODIR} " /java/cuvs-lucene
581+ LUCENE_BUILD_ARGS=()
576582 if hasArg --run-java-tests; then
577- ./build.sh --run-java-tests
578- else
579- ./build.sh
583+ LUCENE_BUILD_ARGS+=(" --run-java-tests" )
584+ fi
585+ if hasArg --build-java-examples; then
586+ LUCENE_BUILD_ARGS+=(" --build-java-examples" )
580587 fi
588+ ./build.sh " ${LUCENE_BUILD_ARGS[@]} "
581589fi
582590
583591RAPIDS_VERSION=" $( sed -E -e ' s/^([0-9]{2})\.([0-9]{2})\.([0-9]{2}).*$/\1.\2.\3/' " ${REPODIR} /VERSION" ) "
0 commit comments