1
0
Fork 0
mirror of https://github.com/yshui/picom.git synced 2024-11-11 13:51:02 -05:00
picom/tests/cmake-test.sh
Richard Grenville 23d1dd1c0e Misc: Add two test scripts
Add two scripts for testing build.
2015-01-11 16:30:41 +08:00

36 lines
598 B
Bash
Executable file

#!/bin/bash
# Test script for CMake build
BASE_DIR=$(dirname "$0")/..
. "${BASE_DIR}/functions.sh"
BUILD_DIR="build"
cmake_prepare() {
[ ! -e "CMakeLists.txt" ] && ln -s {_,}CMakeLists.txt
}
cmake_build() {
einfo Building compton with cmake $@
[ -e "${BUILD_DIR}" ] && rm -r "${BUILD_DIR}"
mkdir "${BUILD_DIR}" && cd "${BUILD_DIR}" || die
cmake ${@} .. || die
make VERBOSE=1 -B || die
cd -
einfo Build completed successfully
}
show_build_help_msg() {
"${BUILD_DIR}/compton" -h | less
}
main() {
cmake_prepare
cmake_build "${@}"
# show_build_help_msg
}
main "${@}"