Skip to content

Commit

Permalink
_build.sh: use Ninja for CMake builds if present [ci skip]
Browse files Browse the repository at this point in the history
  • Loading branch information
vszakats committed Oct 16, 2024
1 parent 5bf36b8 commit 7836518
Showing 1 changed file with 11 additions and 0 deletions.
11 changes: 11 additions & 0 deletions _build.sh
Original file line number Diff line number Diff line change
Expand Up @@ -794,6 +794,17 @@ build_single_target() {
export _CMAKE_ASM_GLOBAL=''
export _CROSS=0

export _MK
if command -v ninja >/dev/null 2>&1; then
_MK='ninja'
else
_MK='gnumake'
fi

if [ "${_MK}" = 'ninja' ]; then
_CMAKE_GLOBAL+=' -G Ninja'
fi

if [[ "${_CONFIG}" =~ (small|zero) ]]; then
_CFLAGS_GLOBAL_RAW+=' -Os'
_CMAKE_GLOBAL+=' -DCMAKE_BUILD_TYPE=MinSizeRel'
Expand Down

0 comments on commit 7836518

Please sign in to comment.