Update for webserver; cleanup in CMakeLists.txt
- Add oai header to typescript and html sources, add support to commands requiring two parameters, add more helpfiles - Fix help bug (html comments not removed from tooltips) - Fix backend build problem and 2 warnings - Correctly initialize variables in nr_phy_scope.c - Use add_subdirectory for websrv cmake build - correctly link to asn1_lte_rrc and asn1_nr_rrc - fix bug: correctly recognize npm packet - only configure targets if explicitly asked for by users - use add_subdirectory - Use add_subdirectory for telnet cmake build - Minor cleanup in build_oai - Move softscope build in dedicated CMakeLists, and comment out DEBUG_MAC_INTERFACE option (not found in code) - Make DEBUG_ASN1 a cmake only option ( no C macro) as it's not used as a C macro in the code, and develop align
This commit is contained in:
+10
-41
@@ -55,14 +55,7 @@ CMAKE_BUILD_TYPE="RelWithDebInfo"
|
||||
CMAKE_CMD="$CMAKE"
|
||||
BUILD_ECLIPSE=0
|
||||
NR="False"
|
||||
OPTIONAL_LIBRARIES="telnetsrv enbscope uescope nrscope ldpc_cuda ldpc_t1"
|
||||
ulfiusdep=$(basename ./`find /usr/lib* -name libulfius.so`)
|
||||
jssondep=$(basename ./`find /usr/lib* -name libjansson.so`)
|
||||
if [ "$ulfiusdep" == "libulfius.so" -a "$jssondep" == "libjansson.so" ] ; then
|
||||
OPTIONAL_LIBRARIES+=" websrv"
|
||||
else
|
||||
echo_warning " websrv optional build not included in build-lib option as dependencies requirements not met "
|
||||
fi
|
||||
OPTIONAL_LIBRARIES="telnetsrv enbscope uescope nrscope ldpc_cuda ldpc_t1 websrv"
|
||||
RU=0
|
||||
CMAKE_C_FLAGS=()
|
||||
CMAKE_CXX_FLAGS=()
|
||||
@@ -85,7 +78,7 @@ Options:
|
||||
-d | --build-dir
|
||||
Sets build directory (will be <oai-root>/cmake_targets/<build-dir>/build)
|
||||
-I | --install-external-packages
|
||||
Installs required packages such as LibXML, asn1.1 compiler, freediameter, ...
|
||||
Installs required packages such as LibXML, asn1.1 compiler, ...
|
||||
This option will require root password
|
||||
--install-optional-packages
|
||||
Install useful but not mandatory packages such as valgrind
|
||||
@@ -392,16 +385,16 @@ function main() {
|
||||
if [ "$alib" = "$oklib" ] ; then
|
||||
BUILD_OPTLIB="$BUILD_OPTLIB $alib"
|
||||
echo_info "Enabling build of lib${alib}.so"
|
||||
fi
|
||||
done
|
||||
done
|
||||
if [ "${BUILD_OPTLIB## }" != "$2" ] ; then
|
||||
fi
|
||||
done
|
||||
done
|
||||
if [ "${BUILD_OPTLIB## }" != "$2" ] ; then
|
||||
echo_fatal "Unknown optional library in $2, valid libraries are $OPTIONAL_LIBRARIES"
|
||||
fi
|
||||
fi
|
||||
for oklib in $BUILD_OPTLIB ; do
|
||||
CMAKE_CMD="$CMAKE_CMD -DENABLE_${oklib^^}=ON"
|
||||
done
|
||||
for oklib in $BUILD_OPTLIB ; do
|
||||
CMAKE_CMD="$CMAKE_CMD -DENABLE_${oklib^^}=ON"
|
||||
done
|
||||
shift 2;;
|
||||
--noavx512)
|
||||
CMAKE_CMD="$CMAKE_CMD -DAVX512=OFF"
|
||||
@@ -476,8 +469,6 @@ function main() {
|
||||
# Setting and printing OAI envs, we should check here #
|
||||
#######################################################
|
||||
|
||||
echo_info "2. Setting the OAI PATHS ..."
|
||||
|
||||
cecho "OPENAIR_DIR = $OPENAIR_DIR" $green
|
||||
|
||||
# for conf files copy in this bash script
|
||||
@@ -554,8 +545,6 @@ function main() {
|
||||
SKIP_SHARED_LIB_FLAG="True"
|
||||
fi
|
||||
|
||||
echo_info "3. building the compilation directives ..."
|
||||
|
||||
DIR=$OPENAIR_DIR/cmake_targets
|
||||
|
||||
[ "$CLEAN" = "1" ] && rm -rf $DIR/$BUILD_DIR/build
|
||||
@@ -658,27 +647,9 @@ function main() {
|
||||
if [ ! -z "$BUILD_OPTLIB" ] ; then
|
||||
for oklib in $BUILD_OPTLIB ; do
|
||||
compilations $BUILD_DIR $oklib
|
||||
if [ "$oklib" == "websrv" ] ; then
|
||||
BUILD_WEBSRVFRONT=1
|
||||
echo_info "Build of websrv frontend enabled"
|
||||
fi
|
||||
done
|
||||
fi
|
||||
|
||||
############################################
|
||||
# Optional targets (others than libraries) #
|
||||
############################################
|
||||
if [ "$BUILD_WEBSRVFRONT" = "1" ] ; then
|
||||
npmv=`command npm -v`
|
||||
npms=$?
|
||||
nodev=`command node -v`
|
||||
nodes=$?
|
||||
if [ "$npms" == "0" -a "$nodes" == "0" ] ; then
|
||||
compilations $BUILD_DIR websrvfront
|
||||
else
|
||||
echo_warning "build of websrv front-end skipped, dependencies not met : " $npmv " " $nodev
|
||||
fi
|
||||
fi
|
||||
|
||||
####################################################
|
||||
# Build RF device and transport protocol libraries #
|
||||
####################################################
|
||||
@@ -767,7 +738,6 @@ function main() {
|
||||
# Auto-tests #
|
||||
##############
|
||||
if [ "$OAI_TEST" = "1" ] ; then
|
||||
echo_info "10. Running OAI pre commit tests (pre-ci) ..."
|
||||
echo_error "These scripts ASSUME that user is in /etc/sudoers and can execute commands without PASSWORD prompt"
|
||||
echo_error "Add the following lines in /etc/sudoers file to make your __user_name__ sudo without password prompt"
|
||||
echo_error " __your_user_name__ ALL = (ALL:ALL) NOPASSWD: ALL"
|
||||
@@ -787,7 +757,6 @@ function main() {
|
||||
fi
|
||||
wait
|
||||
else
|
||||
echo_info "10. Bypassing the Tests ..."
|
||||
echo_success "BUILD SHOULD BE SUCCESSFUL"
|
||||
fi
|
||||
|
||||
|
||||
@@ -11,7 +11,7 @@ macro(add_option name val helpstr)
|
||||
add_definitions("-D${name}=${value}")
|
||||
endmacro(add_option)
|
||||
|
||||
macro(add_boolean_option name val helpstr)
|
||||
macro(add_boolean_option name val helpstr adddef)
|
||||
if(DEFINED ${name})
|
||||
set(value ${${name}})
|
||||
else(DEFINED ${name})
|
||||
@@ -19,9 +19,9 @@ macro(add_boolean_option name val helpstr)
|
||||
endif()
|
||||
set(${name} ${value} CACHE STRING "${helpstr}")
|
||||
set_property(CACHE ${name} PROPERTY TYPE BOOL)
|
||||
if (${value})
|
||||
if (${value} AND ${adddef})
|
||||
add_definitions("-D${name}")
|
||||
endif (${value})
|
||||
endif (${value} AND ${adddef})
|
||||
endmacro(add_boolean_option)
|
||||
|
||||
macro(add_integer_option name val helpstr)
|
||||
|
||||
Reference in New Issue
Block a user