Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
O
OpenXG-RAN
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
wangjie
OpenXG-RAN
Commits
2922f195
Commit
2922f195
authored
Nov 15, 2020
by
Robert Schmidt
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Avoid duplicate CMakeLists.txt generation for ran_build
parent
f9739f2b
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
26 additions
and
46 deletions
+26
-46
cmake_targets/CMakeLists.txt
cmake_targets/CMakeLists.txt
+4
-4
cmake_targets/build_oai
cmake_targets/build_oai
+22
-42
No files found.
cmake_targets/CMakeLists.txt
View file @
2922f195
...
@@ -21,7 +21,9 @@
...
@@ -21,7 +21,9 @@
# Author: laurent THOMAS, Lionel GAUTHIER
# Author: laurent THOMAS, Lionel GAUTHIER
cmake_minimum_required
(
VERSION 3.0
)
# Ubuntu 16.04 has 3.5
cmake_minimum_required
(
VERSION 3.5
)
project
(
OpenAirInterface VERSION 1.2.2 LANGUAGES C CXX
)
include
(
"macros.cmake"
)
include
(
"macros.cmake"
)
...
@@ -47,6 +49,7 @@ pkg_search_module(CRYPTO libcrypto REQUIRED)
...
@@ -47,6 +49,7 @@ pkg_search_module(CRYPTO libcrypto REQUIRED)
include_directories
(
${
CRYPTO_INCLUDE_DIRS
}
)
include_directories
(
${
CRYPTO_INCLUDE_DIRS
}
)
#use native cmake method as this package is not in pkg-config
#use native cmake method as this package is not in pkg-config
add_list2_option
(
RF_BOARD
"EXMIMO"
"RF head type"
"None"
"OAI_USRP"
"OAI_BLADERF"
"OAI_LMSSDR"
"OAI_SIMU"
)
if
(
${
RF_BOARD
}
STREQUAL
"OAI_USRP"
)
if
(
${
RF_BOARD
}
STREQUAL
"OAI_USRP"
)
find_package
(
Boost REQUIRED
)
find_package
(
Boost REQUIRED
)
include_directories
(
${
LIBBOOST_INCLUDE_DIR
}
)
include_directories
(
${
LIBBOOST_INCLUDE_DIR
}
)
...
@@ -150,7 +153,6 @@ set (OPENAIR3_DIR ${OPENAIR_DIR}/openair3)
...
@@ -150,7 +153,6 @@ set (OPENAIR3_DIR ${OPENAIR_DIR}/openair3)
set
(
OPENAIR_CMAKE
${
OPENAIR_DIR
}
/cmake_targets
)
set
(
OPENAIR_CMAKE
${
OPENAIR_DIR
}
/cmake_targets
)
set
(
OPENAIR_BIN_DIR
${
CMAKE_CURRENT_BINARY_DIR
}${
CMAKE_FILES_DIRECTORY
}
)
set
(
OPENAIR_BIN_DIR
${
CMAKE_CURRENT_BINARY_DIR
}${
CMAKE_FILES_DIRECTORY
}
)
project
(
OpenAirInterface
)
...
@@ -753,8 +755,6 @@ add_library(F1AP
...
@@ -753,8 +755,6 @@ add_library(F1AP
add_list1_option
(
NB_ANTENNAS_RX
"2"
"Number of antennas in reception"
"1"
"2"
"4"
)
add_list1_option
(
NB_ANTENNAS_RX
"2"
"Number of antennas in reception"
"1"
"2"
"4"
)
add_list1_option
(
NB_ANTENNAS_TX
"4"
"Number of antennas in transmission"
"1"
"2"
"4"
)
add_list1_option
(
NB_ANTENNAS_TX
"4"
"Number of antennas in transmission"
"1"
"2"
"4"
)
add_list2_option
(
RF_BOARD
"EXMIMO"
"RF head type"
"None"
"OAI_USRP"
"OAI_BLADERF"
"OAI_LMSSDR"
"OAI_SIMU"
)
add_list2_option
(
TRANSP_PRO
"None"
"Transport protocol type"
"None"
"ETHERNET"
)
add_list2_option
(
TRANSP_PRO
"None"
"Transport protocol type"
"None"
"ETHERNET"
)
...
...
cmake_targets/build_oai
View file @
2922f195
...
@@ -51,7 +51,6 @@ HW="None"
...
@@ -51,7 +51,6 @@ HW="None"
TP
=
"None"
TP
=
"None"
EPC
=
0
EPC
=
0
VERBOSE_COMPILE
=
0
VERBOSE_COMPILE
=
0
CFLAGS_PROCESSOR_USER
=
""
RUN_GROUP
=
0
RUN_GROUP
=
0
TEST_CASE_GROUP
=
""
TEST_CASE_GROUP
=
""
BUILD_DOXYGEN
=
0
BUILD_DOXYGEN
=
0
...
@@ -60,13 +59,8 @@ T_TRACER="True"
...
@@ -60,13 +59,8 @@ T_TRACER="True"
DISABLE_HARDWARE_DEPENDENCY
=
"False"
DISABLE_HARDWARE_DEPENDENCY
=
"False"
CMAKE_BUILD_TYPE
=
""
CMAKE_BUILD_TYPE
=
""
CMAKE_CMD
=
"
$CMAKE
"
CMAKE_CMD
=
"
$CMAKE
"
UE_AUTOTEST_TRACE
=
"False"
UE_DEBUG_TRACE
=
"False"
UE_TIMING_TRACE
=
"False"
USRP_REC_PLAY
=
"False"
BUILD_ECLIPSE
=
0
BUILD_ECLIPSE
=
0
NR
=
"False"
NR
=
"False"
ITTI_SIM
=
"False"
OPTIONAL_LIBRARIES
=
"telnetsrv enbscope uescope nrscope msc"
OPTIONAL_LIBRARIES
=
"telnetsrv enbscope uescope nrscope msc"
trap
handle_ctrl_c INT
trap
handle_ctrl_c INT
...
@@ -263,7 +257,7 @@ function main() {
...
@@ -263,7 +257,7 @@ function main() {
echo_info
"Will compile NR UE"
echo_info
"Will compile NR UE"
shift
;;
shift
;;
--mu
)
--mu
)
UE_EXPANSION
=
"
True"
CMAKE_CMD+
=
" -DUE_EXPANSION=True -DPRE_SCD_THREAD=
True"
echo_info
"Will compile with UE_EXPANSION"
echo_info
"Will compile with UE_EXPANSION"
shift
;;
shift
;;
--UE-conf-nvram
)
--UE-conf-nvram
)
...
@@ -276,13 +270,13 @@ function main() {
...
@@ -276,13 +270,13 @@ function main() {
# Use OAI_USRP as the key word USRP is used inside UHD driver
# Use OAI_USRP as the key word USRP is used inside UHD driver
case
"
$2
"
in
case
"
$2
"
in
"EXMIMO"
)
"EXMIMO"
)
HW
=
"EXMIMO
"
CMAKE_CMD+
=
" -DRF_BOARD=
\"
EXMIMO
\"
"
;;
;;
"USRP"
|
"BLADERF"
|
"LMSSDR"
|
"IRIS"
|
"ADRV9371_ZC706"
|
"SIMU"
)
"USRP"
|
"BLADERF"
|
"LMSSDR"
|
"IRIS"
|
"ADRV9371_ZC706"
|
"SIMU"
)
HW
=
"OAI_"
$2
CMAKE_CMD+
=
" -DRF_BOARD=
\"
OAI_
$2
\"
"
;;
;;
"None"
)
"None"
)
HW
=
"None
"
CMAKE_CMD+
=
" -DRF_BOARD=
\"
None
\"
"
;;
;;
*
)
*
)
echo_fatal
"Unknown HW type
$HW
: exit..."
echo_fatal
"Unknown HW type
$HW
: exit..."
...
@@ -309,6 +303,7 @@ function main() {
...
@@ -309,6 +303,7 @@ function main() {
-V
|
--vcd
)
-V
|
--vcd
)
echo_info
"Setting gtk-wave output"
echo_info
"Setting gtk-wave output"
VCD_TIMING
=
1
VCD_TIMING
=
1
CMAKE_CMD+
=
" -DENABLE_VCD_FIFO=True"
EXE_ARGUMENTS
=
"
$EXE_ARGUMENTS
-V"
EXE_ARGUMENTS
=
"
$EXE_ARGUMENTS
-V"
shift
;;
shift
;;
-x
|
--xforms
)
-x
|
--xforms
)
...
@@ -329,8 +324,9 @@ function main() {
...
@@ -329,8 +324,9 @@ function main() {
echo_info
"Will compile with verbose instructions"
echo_info
"Will compile with verbose instructions"
shift
;;
shift
;;
--cflags_processor
)
--cflags_processor
)
CFLAGS_PROCESSOR_USER
=
$2
# Prepend(!) flags to cmake program call
echo_info
"Setting CPU FLAGS from USER to:
$CFLAGS_PROCESSOR_USER
"
CMAKE_CMD
=
"CFLAGS=
\"
$2
\"
$CMAKE_CMD
"
echo_info
"Setting CPU FLAGS from USER to:
$2
"
shift
2
;;
shift
2
;;
--build-doxygen
)
--build-doxygen
)
BUILD_DOXYGEN
=
1
BUILD_DOXYGEN
=
1
...
@@ -341,23 +337,28 @@ function main() {
...
@@ -341,23 +337,28 @@ function main() {
echo_info
"Will build Coverity-Scan objects for upload"
echo_info
"Will build Coverity-Scan objects for upload"
shift
;;
shift
;;
--disable-deadline
)
--disable-deadline
)
CMAKE_CMD+
=
" -DDEADLINE_SCHEDULER=False"
DEADLINE_SCHEDULER_FLAG_USER
=
"False"
DEADLINE_SCHEDULER_FLAG_USER
=
"False"
echo_info
"Disabling the usage of deadline scheduler"
echo_info
"Disabling the usage of deadline scheduler"
shift
1
;;
shift
1
;;
--enable-deadline
)
--enable-deadline
)
CMAKE_CMD+
=
" -DDEADLINE_SCHEDULER=True"
DEADLINE_SCHEDULER_FLAG_USER
=
"True"
DEADLINE_SCHEDULER_FLAG_USER
=
"True"
echo_info
"Enabling the usage of deadline scheduler"
echo_info
"Enabling the usage of deadline scheduler"
shift
1
;;
shift
1
;;
--enable-cpu-affinity
)
--enable-cpu-affinity
)
CMAKE_CMD+
=
" -DCPU_AFFINITY=True"
CPU_AFFINITY_FLAG_USER
=
"True"
CPU_AFFINITY_FLAG_USER
=
"True"
echo_info
"Enabling CPU Affinity (only valid when not using deadline scheduler)"
echo_info
"Enabling CPU Affinity (only valid when not using deadline scheduler)"
shift
1
;;
shift
1
;;
--disable-cpu-affinity
)
--disable-cpu-affinity
)
CMAKE_CMD+
=
" -DCPU_AFFINITY=False"
CPU_AFFINITY_FLAG_USER
=
"False"
CPU_AFFINITY_FLAG_USER
=
"False"
echo_info
"Disabling CPU Affinity (only valid when not using deadline scheduler)"
echo_info
"Disabling CPU Affinity (only valid when not using deadline scheduler)"
shift
1
;;
shift
1
;;
--disable-T-Tracer
)
--disable-T-Tracer
)
T_TRACER
=
"False"
T_TRACER
=
"False"
CMAKE_CMD+
=
" -DT_TRACER=False"
echo_info
"Disabling the T tracer"
echo_info
"Disabling the T tracer"
shift
1
;;
shift
1
;;
--disable-hardware-dependency
)
--disable-hardware-dependency
)
...
@@ -365,15 +366,15 @@ function main() {
...
@@ -365,15 +366,15 @@ function main() {
DISABLE_HARDWARE_DEPENDENCY
=
"True"
DISABLE_HARDWARE_DEPENDENCY
=
"True"
shift
1
;;
shift
1
;;
--ue-autotest-trace
)
--ue-autotest-trace
)
UE_AUTOTEST_TRACE
=
"
True"
CMAKE_CMD+
=
" -DUE_AUTOTEST_TRACE=
True"
echo_info
"Enabling autotest specific trace for UE"
echo_info
"Enabling autotest specific trace for UE"
shift
1
;;
shift
1
;;
--ue-trace
)
--ue-trace
)
UE_DEBUG_TRACE
=
"
True"
CMAKE_CMD+
=
" -DUE_DEBUG_TRACE=
True"
echo_info
"Enabling UE trace for debug"
echo_info
"Enabling UE trace for debug"
shift
1
;;
shift
1
;;
--ue-timing
)
--ue-timing
)
UE_TIMING_TRACE
=
"
True"
CMAKE_CMD+
=
" -DUE_TIMING_TRACE=
True"
echo_info
"Enabling UE timing trace"
echo_info
"Enabling UE timing trace"
shift
1
;;
shift
1
;;
--uhd-images-dir
)
--uhd-images-dir
)
...
@@ -405,11 +406,11 @@ function main() {
...
@@ -405,11 +406,11 @@ function main() {
fi
fi
shift
2
;;
shift
2
;;
--usrp-recplay
)
--usrp-recplay
)
USRP_REC_PLAY
=
"
True"
CMAKE_CMD+
=
" -DUSRP_REC_PLAY=
True"
echo_info
"Enabling USRP record playback mode"
echo_info
"Enabling USRP record playback mode"
shift
1
;;
shift
1
;;
-k
|
--skip-shared-libraries
)
-k
|
--skip-shared-libraries
)
SKIP_SHARED_LIB_FLAG
=
"
True"
CMAKE_CMD+
=
" -DSKIP_SHARED_LIB_FLAG=
True"
echo_info
"Skipping build of shared libraries, rfsimulator and transport protocol libraries"
echo_info
"Skipping build of shared libraries, rfsimulator and transport protocol libraries"
shift
;;
shift
;;
--ninja
)
--ninja
)
...
@@ -418,7 +419,7 @@ function main() {
...
@@ -418,7 +419,7 @@ function main() {
shift
;;
shift
;;
--ittiSIM
)
--ittiSIM
)
ittiSIM
=
1
ittiSIM
=
1
ITTI_SIM
=
"
True"
CMAKE_CMD+
=
" -DITTI_SIM=
True"
echo_info
"Will compile itti simulator"
echo_info
"Will compile itti simulator"
shift
;;
shift
;;
-h
|
--help
)
-h
|
--help
)
...
@@ -444,7 +445,9 @@ function main() {
...
@@ -444,7 +445,9 @@ function main() {
fi
fi
fi
fi
CMAKE_CMD
=
"
$CMAKE_CMD
.."
# We use the CMakeLists.txt in cmake_targets, but (for historical reasons)
# build in a subdirectory XYZ/build, e.g., ran_build/build, hence the ../..
CMAKE_CMD
=
"
$CMAKE_CMD
../.."
echo_info
"CMAKE_CMD=
$CMAKE_CMD
"
echo_info
"CMAKE_CMD=
$CMAKE_CMD
"
########################################################
########################################################
...
@@ -582,29 +585,6 @@ function main() {
...
@@ -582,29 +585,6 @@ function main() {
if
[
"
$eNB
"
=
"1"
-o
"
$eNBocp
"
=
"1"
-o
"
$UE
"
=
"1"
-o
"
$gNB
"
=
"1"
-o
"
$nrUE
"
=
"1"
-o
"
$HW
"
=
"EXMIMO"
-o
"
$ittiSIM
"
=
"1"
]
;
then
if
[
"
$eNB
"
=
"1"
-o
"
$eNBocp
"
=
"1"
-o
"
$UE
"
=
"1"
-o
"
$gNB
"
=
"1"
-o
"
$nrUE
"
=
"1"
-o
"
$HW
"
=
"EXMIMO"
-o
"
$ittiSIM
"
=
"1"
]
;
then
# softmodem compilation
# softmodem compilation
cmake_file
=
$DIR
/
$build_dir
/CMakeLists.txt
echo
"cmake_minimum_required(VERSION 2.8)"
>
$cmake_file
echo
"project (OpenAirInterface)"
>>
$cmake_file
echo
"set ( CMAKE_BUILD_TYPE
$CMAKE_BUILD_TYPE
)"
>>
$cmake_file
echo
"set ( CFLAGS_PROCESSOR_USER
\"
$CFLAGS_PROCESSOR_USER
\"
)"
>>
$cmake_file
echo
"set ( UE_EXPANSION
$UE_EXPANSION
)"
>>
$cmake_file
# echo "set ( PHY_TX_THREAD $UE_EXPANSION )" >> $cmake_file
echo
"set ( PRE_SCD_THREAD
$UE_EXPANSION
)"
>>
$cmake_file
echo
"set ( ENABLE_VCD_FIFO
$VCD_TIMING
)"
>>
$cmake_file
echo
"set ( RF_BOARD
\"
${
HW
}
\"
)"
>>
$cmake_file
echo
"set ( TRANSP_PRO
\"
${
TP
}
\"
)"
>>
$cmake_file
echo
"set ( PACKAGE_NAME
\"
${
exec
}
\"
)"
>>
$cmake_file
echo
"set ( DEADLINE_SCHEDULER
\"
${
DEADLINE_SCHEDULER_FLAG_USER
}
\"
)"
>>
$cmake_file
echo
"set ( CPU_AFFINITY
\"
${
CPU_AFFINITY_FLAG_USER
}
\"
)"
>>
$cmake_file
echo
"set ( T_TRACER
$T_TRACER
)"
>>
$cmake_file
echo
"set ( UE_AUTOTEST_TRACE
$UE_AUTOTEST_TRACE
)"
>>
$cmake_file
echo
"set ( UE_DEBUG_TRACE
$UE_DEBUG_TRACE
)"
>>
$cmake_file
echo
"set ( UE_TIMING_TRACE
$UE_TIMING_TRACE
)"
>>
$cmake_file
echo
"set ( USRP_REC_PLAY
$USRP_REC_PLAY
)"
>>
$cmake_file
echo
"set ( SKIP_SHARED_LIB_FLAG
$SKIP_SHARED_LIB_FLAG
)"
>>
$cmake_file
echo
"set ( ITTI_SIM
$ITTI_SIM
)"
>>
$cmake_file
echo
'include(${CMAKE_CURRENT_SOURCE_DIR}/../CMakeLists.txt)'
>>
$cmake_file
cd
$DIR
/
$build_dir
/build
cd
$DIR
/
$build_dir
/build
eval
$CMAKE_CMD
eval
$CMAKE_CMD
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment