Nobuaki Sukegawa | a6ab1f5 | 2015-11-28 15:04:39 +0900 | [diff] [blame] | 1 | #!/bin/sh |
| 2 | set -ev |
| 3 | |
Nobuaki Sukegawa | 6bb1277 | 2016-03-08 01:55:31 +0900 | [diff] [blame] | 4 | CMAKE_FLAGS=$* |
| 5 | MAKEPROG=make |
| 6 | |
| 7 | if ninja --version >/dev/null 2>&1; then |
| 8 | MAKEPROG=ninja |
| 9 | CMAKE_FLAGS="-GNinja $CMAKE_FLAGS" |
| 10 | fi |
| 11 | |
Nobuaki Sukegawa | a6ab1f5 | 2015-11-28 15:04:39 +0900 | [diff] [blame] | 12 | mkdir -p cmake_build && cd cmake_build |
Nobuaki Sukegawa | 6bb1277 | 2016-03-08 01:55:31 +0900 | [diff] [blame] | 13 | cmake $CMAKE_FLAGS .. |
Nobuaki Sukegawa | c40018b | 2016-02-22 21:29:13 +0900 | [diff] [blame] | 14 | for LIB in $BUILD_LIBS; do |
| 15 | if ! grep "^BUILD_${LIB}:BOOL=ON$" CMakeCache.txt ; then |
| 16 | echo "failed to configure $LIB" |
| 17 | exit 1 |
| 18 | fi |
| 19 | done |
Nobuaki Sukegawa | 6bb1277 | 2016-03-08 01:55:31 +0900 | [diff] [blame] | 20 | $MAKEPROG -j3 |
Nobuaki Sukegawa | a6ab1f5 | 2015-11-28 15:04:39 +0900 | [diff] [blame] | 21 | cpack |
James E. King III | c9ac8d2 | 2019-01-07 16:46:45 -0500 | [diff] [blame] | 22 | ctest -VV |