This repository was archived by the owner on Oct 13, 2022. It is now read-only.
File tree Expand file tree Collapse file tree 1 file changed +12
-7
lines changed Expand file tree Collapse file tree 1 file changed +12
-7
lines changed Original file line number Diff line number Diff line change @@ -42,24 +42,29 @@ curl -L https://github.com/rvaser/spoa/releases/download/3.4.0/spoa-v3.4.0.tar.g
42
42
tar -xvf spoa-v3.4.0.tar.gz
43
43
44
44
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
50
45
51
46
# Build the shared library.
52
47
mkdir build
53
48
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
55
55
make -j all
56
56
make install
57
57
58
58
# Build the static library.
59
59
cd ..
60
60
mkdir build-static
61
61
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
63
68
make -j all
64
69
make install
65
70
cd
You can’t perform that action at this time.
0 commit comments