2017-06-24 19:14:22 -07:00
|
|
|
#!/bin/sh -ex
|
2016-12-26 14:16:56 +08:00
|
|
|
mkdir -p cmocka
|
2016-12-26 13:45:40 +08:00
|
|
|
#wget https://cmocka.org/files/1.1/cmocka-1.1.0.tar.xz -O /tmp/cmocka-1.1.0.tar.xz
|
2017-06-24 19:14:22 -07:00
|
|
|
wget --no-check-certificate https://cmocka.org/files/1.1/cmocka-1.1.1.tar.xz -P /tmp/
|
|
|
|
tar -xf /tmp/cmocka-1.1.1.tar.xz -C /tmp
|
|
|
|
cd cmocka && cmake -DUNIT_TESTING=On /tmp/cmocka-1.1.1 && make && make test
|
2016-11-19 01:17:48 -08:00
|
|
|
# cmake builds an so instead of a dll in mingw/msys
|
|
|
|
if [[ ! -z $MSYSTEM ]]; then
|
|
|
|
cp src/cmocka.so src/cmocka.dll
|
|
|
|
fi
|
|
|
|
# cmocka does not include headers in build
|
2017-06-24 19:14:22 -07:00
|
|
|
cp -R /tmp/cmocka-1.1.1/include/ .
|