Выбор типа генератора

This commit is contained in:
Andrei Astafev 2019-03-13 20:15:01 +03:00
parent 5b2635867d
commit f8d79f8c2b

View File

@ -1,7 +1,11 @@
#!/bin/bash #!/bin/bash
GENERATOR=make [ -x "$(command -v make)" ] && GENERATOR="Unix Makefiles"
[ -x "$(command -v ninja)" ] && GENERATOR=Ninja [ -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}') 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" -g "${GENERATOR}" -f -t Debug