Преглед изворни кода

CI: Update build script to use Xcode generator by default outside of CI

It is preferred that developers use Xcode when developing plugins for
macOS. On CI, Ninja is preferred for support of ccache and thus speed
of compilation.
PatTheMav пре 2 година
родитељ
комит
40e6d8edac
1 измењених фајлова са 3 додато и 2 уклоњено
  1. 3 2
      .github/scripts/.build.zsh

+ 3 - 2
.github/scripts/.build.zsh

@@ -61,10 +61,11 @@ build() {
   local -r -a _valid_configs=(Debug RelWithDebInfo Release MinSizeRel)
   if [[ ${host_os} == 'macos' ]] {
     local -r -a _valid_generators=(Xcode Ninja 'Unix Makefiles')
+    local generator="${${CI:+Ninja}:-Xcode}"
   } else {
     local -r -a _valid_generators=(Ninja 'Unix Makefiles')
+    local generator='Ninja'
   }
-  local generator='Ninja'
   local -r _usage="
 Usage: %B${functrace[1]%:*}%b <option> [<options>]
 
@@ -197,7 +198,7 @@ Usage: %B${functrace[1]%:*}%b <option> [<options>]
     )
 
     if (( _loglevel == 0 )) cmake_args+=(-Wno_deprecated -Wno-dev --log-level=ERROR)
-    if (( _logLevel > 2 )) cmake_args+=(--debug-output)
+    if (( _loglevel > 2 )) cmake_args+=(--debug-output)
 
     local num_procs