Если найден Ninja, использовать по умолчанию
This commit is contained in:
parent
f8d79f8c2b
commit
4c57e48a3d
8
cmake.sh
8
cmake.sh
@ -21,7 +21,8 @@ LONGOPTS=generator:,type:,qtcreator,cmake,force,source-dir:,build-dir:,output-di
|
||||
eval set -- "$PARSED"
|
||||
|
||||
# Default generator
|
||||
GENERATOR="Unix Makefiles"
|
||||
[ -x "$(command -v make)" ] && GENERATOR="Unix Makefiles"
|
||||
[ -x "$(command -v ninja)" ] && GENERATOR=Ninja
|
||||
|
||||
# Generate single build type
|
||||
SINGLE_TYPE="n"
|
||||
@ -89,6 +90,11 @@ while true; do
|
||||
esac
|
||||
done
|
||||
|
||||
if [ "x${GENERATOR}" = "x" ]; then
|
||||
echo "Build command is not found"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
CMAKE_ARGS=""
|
||||
[ ${#@} -gt 0 ] && CMAKE_ARGS=("${@}")
|
||||
|
||||
|
@ -1,12 +1,6 @@
|
||||
#!/bin/bash
|
||||
|
||||
[ -x "$(command -v make)" ] && GENERATOR="Unix Makefiles"
|
||||
[ -x "$(command -v ninja)" ] && GENERATOR=Ninja
|
||||
if [ "x${GENERATOR}" = "x" ]; then
|
||||
echo "Build command is not found"
|
||||
exit 1
|
||||
fi
|
||||
PROJECT=$(grep -i "^Project" "$(dirname -- "$(dirname -- "$(pwd)")")/CMakeLists.txt" | awk -F'[()]' '{print $2}')
|
||||
|
||||
"$(dirname $0)/cmake.sh" -g "${GENERATOR}" -f -t Debug
|
||||
"$(dirname $0)/cmake.sh" -f -t Debug
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user