From b1a127a54699ee419117288c9febf1f695471883 Mon Sep 17 00:00:00 2001 From: Paul Sutton Date: Tue, 14 Apr 2020 17:20:38 +0100 Subject: [PATCH] Adding custom build target to build osmo-gsm-tester trial --- CMakeLists.txt | 8 +++++++- build_trial.sh | 14 ++++++++++++++ 2 files changed, 21 insertions(+), 1 deletion(-) create mode 100755 build_trial.sh diff --git a/CMakeLists.txt b/CMakeLists.txt index 2e2b07af8..b7f4cca6d 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -500,6 +500,12 @@ configure_file( add_custom_target(uninstall COMMAND ${CMAKE_COMMAND} -P ${CMAKE_CURRENT_BINARY_DIR}/cmake_uninstall.cmake) +######################################################################## +# Create optional target to build osmo-gsm-tester trial +######################################################################## +add_custom_target(trial + COMMAND ${CMAKE_CURRENT_SOURCE_DIR}/build_trial.sh) + ######################################################################## # Add -fPIC property to all targets ######################################################################## @@ -560,4 +566,4 @@ else(ENABLE_SRSEPC) message(STATUS "srsEPC build disabled") endif(ENABLE_SRSEPC) -add_subdirectory(test) \ No newline at end of file +add_subdirectory(test) diff --git a/build_trial.sh b/build_trial.sh new file mode 100755 index 000000000..876f1197e --- /dev/null +++ b/build_trial.sh @@ -0,0 +1,14 @@ +#!/bin/bash + +rm -rf sysroot && mkdir sysroot +cmake -DCMAKE_INSTALL_PREFIX="sysroot/" ../ +make install +this="$(date +%Y-%m-%d_%H_%M_%S)" +trialdir="srslte_trial_${this}" +tar="srslte.build-${this}.tgz" +mkdir ${trialdir} +tar czf "${trialdir}/$tar" -C "sysroot" . +md5sum "${trialdir}/$tar" >>${trialdir}/checksums.md5 + +echo "Built ${trialdir}" +