Skip to content
Snippets Groups Projects
Commit 7060afe4 authored by Andreas Traczyk's avatar Andreas Traczyk
Browse files

build.py: add an argument to add client cmake flags

Change-Id: I6b0eae47d4fd52935cc4cef02d79115b80f3d809
parent f5602643
No related branches found
No related tags found
No related merge requests found
......@@ -397,6 +397,8 @@ def run_install(args):
install_args.append('-w')
if args.arch:
install_args += ('-a', args.arch)
if args.extra_cmake_flags:
install_args += ('-D', args.extra_cmake_flags)
if args.distribution == OSX_DISTRIBUTION_NAME:
# The `universal_newlines` parameter has been renamed to `text` in
......@@ -740,6 +742,9 @@ def parse_args():
ap.add_argument('--pywinmake', dest='pywinmake',
default=False, action='store_true',
help='Build Jami for Windows using pywinmake')
# Allow supplying extra congifure flags to the client cmake.
ap.add_argument('--extra-cmake-flags', type=str,
help='Extra flags to pass to the client cmake')
dist = choose_distribution()
......
......@@ -29,6 +29,8 @@ export OSTYPE
# -W: disable libwrap and shared library
# -w: do not use Qt WebEngine
# -a: arch to build
# -A: enable AddressSanitizer
# -D: extra CMake flags for the client
set -ex
......@@ -44,9 +46,10 @@ priv_install=true
enable_libwrap=true
enable_webengine=true
asan=
extra_cmake_flags=''
arch=''
while getopts gsc:dQ:P:p:uWwa:A OPT; do
while getopts gsc:dQ:P:p:uWwa:AD: OPT; do
case "$OPT" in
g)
global='true'
......@@ -81,6 +84,9 @@ while getopts gsc:dQ:P:p:uWwa:A OPT; do
A)
asan='true'
;;
D)
extra_cmake_flags="${OPTARG}"
;;
\?)
exit 1
;;
......@@ -220,6 +226,11 @@ else
-DWITH_DAEMON_SUBMODULE=true)
fi
# Add extra flags for the client
if [ -n "${extra_cmake_flags}" ]; then
client_cmake_flags+=(${extra_cmake_flags})
fi
echo "info: Configuring $client client with flags: ${client_cmake_flags[*]}"
cmake .. "${client_cmake_flags[@]}"
make -j"${proc}" V=1
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment