cmake: generate for Ninja when the build phase is Ninja

This is overridable by providing a custom build phase or setting
dontUseNinjaBuild = true.
This commit is contained in:
Orivej Desh 2017-12-03 07:49:00 +00:00
parent be17bccf38
commit da516f0404

View File

@ -51,6 +51,10 @@ cmakeConfigurePhase() {
# And build always Release, to ensure optimisation flags
cmakeFlags="-DCMAKE_BUILD_TYPE=${cmakeBuildType:-Release} -DCMAKE_SKIP_BUILD_RPATH=ON $cmakeFlags"
if [ "$buildPhase" = ninjaBuildPhase ]; then
cmakeFlags="-GNinja $cmakeFlags"
fi
echo "cmake flags: $cmakeFlags ${cmakeFlagsArray[@]}"
cmake ${cmakeDir:-.} $cmakeFlags "${cmakeFlagsArray[@]}"