From cb5e9d90e467b88672df32c9324e3d02f4cede9f Mon Sep 17 00:00:00 2001
From: Robert Schmidt <robert.schmidt@openairinterface.org>
Date: Fri, 1 Apr 2022 10:22:30 +0200
Subject: [PATCH] Create build_oai option to pass cmake params; add boost
 include dir caracal

---
 ci-scripts/xml_files/gnb_usrp_build.xml | 2 +-
 cmake_targets/build_oai                 | 5 +++++
 2 files changed, 6 insertions(+), 1 deletion(-)

diff --git a/ci-scripts/xml_files/gnb_usrp_build.xml b/ci-scripts/xml_files/gnb_usrp_build.xml
index e2662180c5b..97f85c6a339 100644
--- a/ci-scripts/xml_files/gnb_usrp_build.xml
+++ b/ci-scripts/xml_files/gnb_usrp_build.xml
@@ -34,7 +34,7 @@
 		<mode>TesteNB</mode>	
 		<class>Build_eNB</class>
 		<desc>Build gNB (USRP)</desc>
-		<Build_eNB_args>--gNB -w USRP --ninja</Build_eNB_args>
+		<Build_eNB_args>--gNB -w USRP --ninja --cmake-opt -DBoost_INCLUDE_DIR=/usr/include/boost169</Build_eNB_args>
 		<forced_workspace_cleanup>True</forced_workspace_cleanup>
 	</testCase>
 
diff --git a/cmake_targets/build_oai b/cmake_targets/build_oai
index c65728a41d6..fe59741456a 100755
--- a/cmake_targets/build_oai
+++ b/cmake_targets/build_oai
@@ -72,6 +72,8 @@ Options
    Erase all files made by previous compilations, installations
 --clean-kernel
    Erase previously installed features in kernel: iptables, drivers, ...
+--cmake-opt
+   Pass the supplied option verbatim to cmake.
 -d | --build-dir
    Sets build directory (will be <oai-root>/cmake_targets/<build-dir>/build)
 -I | --install-external-packages
@@ -193,6 +195,9 @@ function main() {
             clean_kernel
             echo_info "Erased iptables config and removed modules from kernel"
             shift;;
+       --cmake-opt)
+            CMAKE_CMD="$CMAKE_CMD $2"
+            shift 2;;
        -d | --build-dir)
             BUILD_DIR=$2
             shift;;
-- 
GitLab