From 3161add2c12f4997ba7b19f8e7bb30469be522ea Mon Sep 17 00:00:00 2001 From: Robert Schmidt Date: Fri, 28 Jul 2023 11:21:38 +0200 Subject: [PATCH] build_oai/build_helper: use $CMAKE Some distributions, e.g., CentOS8 or RHEL8, ship with an old cmake (v2.8). To provide a newer, they have a separate cmake3 package, where a recent cmake version is in program cmake3. To be agnostic, build_helper detects the distribution and choses the cmake program to use. This commit uses the correct cmake, which is provided in the environment variable $CMAKE. --- cmake_targets/build_oai | 2 +- cmake_targets/tools/build_helper | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/cmake_targets/build_oai b/cmake_targets/build_oai index cb66d4f862..687431db37 100755 --- a/cmake_targets/build_oai +++ b/cmake_targets/build_oai @@ -523,7 +523,7 @@ function main() { echo_info "Doxygen generation log is located here: $doxygen_log" echo_info "Generating Doxygen files....please wait" ( - cmake --build . --target doc + $CMAKE --build . --target doc ) >& $doxygen_log fi diff --git a/cmake_targets/tools/build_helper b/cmake_targets/tools/build_helper index 9b643ab16e..4f1ea858a4 100755 --- a/cmake_targets/tools/build_helper +++ b/cmake_targets/tools/build_helper @@ -226,11 +226,11 @@ compilations() { local verbose=$([ "$VERBOSE_COMPILE" == "1" ] && echo "-v" || echo "") echo cd $OPENAIR_DIR/cmake_targets/$dir/build cd $OPENAIR_DIR/cmake_targets/$dir/build - echo_info "Running \"cmake --build . $verbose --target $targets -- -j$(nproc)\"" $green + echo_info "Running \"$CMAKE --build . $verbose --target $targets -- -j$(nproc)\"" $green echo "Log file for compilation is being written to: $dlog/$logfile" set +e { - cmake --build . $verbose --target $targets -- -j$(nproc) + $CMAKE --build . $verbose --target $targets -- -j$(nproc) ret=$? } > $dlog/$logfile 2>&1 if [ "$VERBOSE_CI" == "1" ]; then