Skip to content
This repository was archived by the owner on Oct 13, 2022. It is now read-only.

Commit 34946cf

Browse files
author
Bhal Agashe
committed
[Bugfix] Install the portable version of SPOA when cpu dispatching is not used.
1 parent e417d6c commit 34946cf

File tree

1 file changed

+12
-7
lines changed

1 file changed

+12
-7
lines changed

scripts/InstallPrerequisites-Ubuntu.sh

Lines changed: 12 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -42,24 +42,29 @@ curl -L https://github.com/rvaser/spoa/releases/download/3.4.0/spoa-v3.4.0.tar.g
4242
tar -xvf spoa-v3.4.0.tar.gz
4343

4444
ubuntuVersion=$(cat /etc/os-release | grep VERSION_ID | cut -f2 -d'=')
45-
spoaGenDispatchFlag="ON"
46-
if [ $ubuntuVersion \< "\"18.04\"" ] ; then
47-
# SPOA's cpu dispatching code is tested on newer Linux versions.
48-
spoaGenDispatchFlag="OFF"
49-
fi
5045

5146
# Build the shared library.
5247
mkdir build
5348
cd build
54-
cmake ../spoa-v3.4.0 -DBUILD_SHARED_LIBS=ON -Dspoa_generate_dispatch=$spoaGenDispatchFlag
49+
if [ $ubuntuVersion \< "\"18.04\"" ] ; then
50+
# SPOA's cpu dispatching code is tested on newer Linux versions.
51+
cmake ../spoa-v3.4.0 -DBUILD_SHARED_LIBS=ON -Dspoa_generate_dispatch=OFF -Dspoa_optimize_for_portability=ON
52+
else
53+
cmake ../spoa-v3.4.0 -DBUILD_SHARED_LIBS=ON -Dspoa_generate_dispatch=ON
54+
fi
5555
make -j all
5656
make install
5757

5858
# Build the static library.
5959
cd ..
6060
mkdir build-static
6161
cd build-static
62-
cmake ../spoa-v3.4.0 -DBUILD_SHARED_LIBS=OFF -Dspoa_generate_dispatch=$spoaGenDispatchFlag
62+
if [ $ubuntuVersion \< "\"18.04\"" ] ; then
63+
# SPOA's cpu dispatching code is tested on newer Linux versions.
64+
cmake ../spoa-v3.4.0 -DBUILD_SHARED_LIBS=OFF -Dspoa_generate_dispatch=OFF -Dspoa_optimize_for_portability=ON
65+
else
66+
cmake ../spoa-v3.4.0 -DBUILD_SHARED_LIBS=OFF -Dspoa_generate_dispatch=ON
67+
fi
6368
make -j all
6469
make install
6570
cd

0 commit comments

Comments
 (0)