From 532ac51eafba10000534e4685c5a3702581fb9cd Mon Sep 17 00:00:00 2001 From: Giulio Eulisse <10544+ktf@users.noreply.github.com> Date: Tue, 30 Apr 2024 11:10:00 +0200 Subject: [PATCH] Improve flatbuffer recipe - Bump to the latest version - Clean up old workarounds from the recipe --- flatbuffers.sh | 28 +++++++++++----------------- 1 file changed, 11 insertions(+), 17 deletions(-) diff --git a/flatbuffers.sh b/flatbuffers.sh index 297a31e064..53db7cd59a 100644 --- a/flatbuffers.sh +++ b/flatbuffers.sh @@ -1,5 +1,5 @@ package: flatbuffers -version: v1.12.0 +version: v24.3.25 source: https://github.com/google/flatbuffers requires: - zlib @@ -7,26 +7,20 @@ build_requires: - CMake - "GCC-Toolchain:(?!osx)" - alibuild-recipe-tools + - ninja --- -#!/bin/bash -e -cmake "$SOURCEDIR" \ - -G 'Unix Makefiles' \ - -DFLATBUFFERS_BUILD_TESTS=OFF \ - -DCMAKE_INSTALL_PREFIX="$INSTALLROOT" \ - -DCMAKE_CXX_FLAGS="$CXXFLAGS -Wno-unknown-warning -Wno-unknown-warning-option -Wno-error=unused-but-set-variable" -# LLVM 15 requires -Wno-error=unused-but-set-variable to compile -# flatbuffers, but GCC earlier LLVM versions don't understand this -# option, so we need -Wno-unknown-warning (for GCC) and -# -Wno-unknown-warning-option (for Clang) as well. +cmake "$SOURCEDIR" \ + -G 'Ninja' \ + -DFLATBUFFERS_BUILD_TESTS=OFF \ + -DCMAKE_INSTALL_PREFIX="$INSTALLROOT" -make ${JOBS:+-j $JOBS} -make install +cmake --build . -- ${JOBS:+-j$JOBS} install # Work around potentially faulty CMake (missing `install` for binaries) -mkdir -p "$INSTALLROOT/bin" -for bin in flathash flatc; do - [ -e "$INSTALLROOT/bin/$bin" ] || cp -p "$bin" "$INSTALLROOT/bin/" -done +#mkdir -p "$INSTALLROOT/bin" +#for bin in flathash flatc; do +# [ -e "$INSTALLROOT/bin/$bin" ] || cp -p "$bin" "$INSTALLROOT/bin/" +#done # Modulefile mkdir -p "$INSTALLROOT/etc/modulefiles"