Skip to content

Commit

Permalink
do_cmake,run-make: switch to ninja
Browse files Browse the repository at this point in the history
Signed-off-by: Kefu Chai <kchai@redhat.com>
  • Loading branch information
tchaikov committed Mar 9, 2021
1 parent 6de97d4 commit b05ea0d
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 1 deletion.
1 change: 1 addition & 0 deletions debian/control
Original file line number Diff line number Diff line change
Expand Up @@ -74,6 +74,7 @@ Build-Depends: automake,
# Make-Check libxmlsec1-dev,
# Crimson libyaml-cpp-dev,
lsb-release,
# Make-Check ninja-build,
# Jaeger nlohmann-json-dev | nlohmann-json3-dev,
parted,
patch,
Expand Down
1 change: 1 addition & 0 deletions do_cmake.sh
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@ if [ -e $BUILD_DIR ]; then
fi

PYBUILD="2"
ARGS="-GNinja"
if [ -r /etc/os-release ]; then
source /etc/os-release
case "$ID" in
Expand Down
6 changes: 5 additions & 1 deletion src/script/run-make.sh
Original file line number Diff line number Diff line change
Expand Up @@ -121,10 +121,14 @@ function configure() {

function build() {
local targets="$@"
if test -n $targets; then
targets="--target $targets"
fi
$DRY_RUN cd build
BUILD_MAKEOPTS=${BUILD_MAKEOPTS:-$DEFAULT_MAKEOPTS}
test "$BUILD_MAKEOPTS" && echo "make will run with option(s) $BUILD_MAKEOPTS"
$DRY_RUN make $BUILD_MAKEOPTS $targets || return 1
# older cmake does not support --parallel or -j, so pass it to underlying generator
$DRY_RUN cmake --build . $targets -- $BUILD_MAKEOPTS || return 1
$DRY_RUN ccache -s # print the ccache statistics to evaluate the efficiency
}

Expand Down

0 comments on commit b05ea0d

Please sign in to comment.