mirror of
https://github.com/recp/cglm.git
synced 2025-10-03 16:51:35 +00:00
deps: add cmocka as submodule for unit testing
This commit is contained in:
3
.gitmodules
vendored
Normal file
3
.gitmodules
vendored
Normal file
@@ -0,0 +1,3 @@
|
|||||||
|
[submodule "test/lib/cmocka"]
|
||||||
|
path = test/lib/cmocka
|
||||||
|
url = git://git.cryptomilk.org/projects/cmocka.git
|
@@ -40,6 +40,7 @@ before_install:
|
|||||||
- pip install --user cpp-coveralls
|
- pip install --user cpp-coveralls
|
||||||
|
|
||||||
script:
|
script:
|
||||||
|
- sh ./build-deps.sh
|
||||||
- sh ./autogen.sh
|
- sh ./autogen.sh
|
||||||
- if [[ "$CC" == "gcc" && "$CODE_COVERAGE" == "ON" ]]; then
|
- if [[ "$CC" == "gcc" && "$CODE_COVERAGE" == "ON" ]]; then
|
||||||
./configure CFLAGS="-ftest-coverage -fprofile-arcs";
|
./configure CFLAGS="-ftest-coverage -fprofile-arcs";
|
||||||
|
@@ -88,6 +88,8 @@ MIT. check the LICENSE file
|
|||||||
### Unix (Autotools)
|
### Unix (Autotools)
|
||||||
|
|
||||||
```text
|
```text
|
||||||
|
$ sh ./build-deps.sh # run only once (dependencies)
|
||||||
|
$
|
||||||
$ sh autogen.sh
|
$ sh autogen.sh
|
||||||
$ ./configure
|
$ ./configure
|
||||||
$ make
|
$ make
|
||||||
|
30
build-deps.sh
Normal file
30
build-deps.sh
Normal file
@@ -0,0 +1,30 @@
|
|||||||
|
#! /bin/sh
|
||||||
|
#
|
||||||
|
# Copyright (c), Recep Aslantas.
|
||||||
|
#
|
||||||
|
# MIT License (MIT), http://opensource.org/licenses/MIT
|
||||||
|
# Full license can be found in the LICENSE file
|
||||||
|
#
|
||||||
|
|
||||||
|
# check if deps are pulled
|
||||||
|
git submodule update --init --recursive
|
||||||
|
|
||||||
|
# fix glibtoolize
|
||||||
|
|
||||||
|
cd $(dirname "$0")
|
||||||
|
|
||||||
|
if [ "$(uname)" = "Darwin" ]; then
|
||||||
|
libtoolBin=$(which glibtoolize)
|
||||||
|
libtoolBinDir=$(dirname "${libtoolBin}")
|
||||||
|
ln -s $libtoolBin "${libtoolBinDir}/libtoolize"
|
||||||
|
fi
|
||||||
|
|
||||||
|
# general deps: gcc make autoconf automake libtool cmake
|
||||||
|
|
||||||
|
# test - cmocka
|
||||||
|
cd ./test/lib/cmocka
|
||||||
|
mkdir build
|
||||||
|
cd build
|
||||||
|
cmake -DCMAKE_INSTALL_PREFIX=/usr -DCMAKE_BUILD_TYPE=Debug ..
|
||||||
|
make -j8
|
||||||
|
cd ../../../../
|
1
test/lib/cmocka
Submodule
1
test/lib/cmocka
Submodule
Submodule test/lib/cmocka added at 5f61d2f188
Reference in New Issue
Block a user