summaryrefslogtreecommitdiff
path: root/build.sh
diff options
context:
space:
mode:
authorNat Goodspeed <nat@lindenlab.com>2021-09-28 16:40:33 -0400
committerNat Goodspeed <nat@lindenlab.com>2021-09-28 16:40:33 -0400
commit3e12a97a7f0dfa951c3997dd2117d2418fe21ce6 (patch)
treedb11cdb39547072378746333dbf3491fcec8aed7 /build.sh
parent68be3018ab1dcaf31e9a67cd0fc4d996b535d17f (diff)
SL-16040: Honor autobuild_{configure,build}_parameters variables.
The generic build.sh script honors these environment variables to specify parameters to the autobuild configure and autobuild build steps, respectively. Support them in the viewer-specific build.sh too. In the generic build.sh, autobuild_configure_parameters allows specifying command-line switches either for autobuild or, following --, for the underlying tool (in our case, CMake). In order to support that variable the same way here, we insert -- (as before) when autobuild_configure_parameters is unset or empty, since the rest of the switches *we* specify are for CMake. That means that, as with the generic build.sh, a non-empty autobuild_configure_parameters override must precede any switches intended for CMake with the -- separator.
Diffstat (limited to 'build.sh')
-rwxr-xr-xbuild.sh12
1 files changed, 10 insertions, 2 deletions
diff --git a/build.sh b/build.sh
index 96bcff0e8e..3291039856 100755
--- a/build.sh
+++ b/build.sh
@@ -132,7 +132,11 @@ pre_build()
fi
set -x
- "$autobuild" configure --quiet -c $variant -- \
+ # honor autobuild_configure_parameters same as sling-buildscripts
+ eval_autobuild_configure_parameters=$(eval $(echo echo $autobuild_configure_parameters))
+
+ "$autobuild" configure --quiet -c $variant \
+ ${eval_autobuild_configure_parameters:---} \
-DPACKAGE:BOOL=ON \
-DHAVOK:BOOL="$HAVOK" \
-DRELEASE_CRASH_REPORTING:BOOL="$RELEASE_CRASH_REPORTING" \
@@ -182,7 +186,11 @@ build()
if $build_viewer
then
begin_section "autobuild $variant"
- "$autobuild" build --no-configure -c $variant || fatal "failed building $variant"
+ # honor autobuild_build_parameters same as sling-buildscripts
+ eval_autobuild_build_parameters=$(eval $(echo echo $autobuild_build_parameters))
+ "$autobuild" build --no-configure -c $variant \
+ $eval_autobuild_build_parameters \
+ || fatal "failed building $variant"
echo true >"$build_dir"/build_ok
end_section "autobuild $variant"