<commit_before>PKG_NAME=flatc
PKG_URL=https://github.com/google/flatbuffers
PKG_VERSION=9e7e8cbe9f675123dd41b7c62868acad39188cae
PKG_LICENSE=Apache2.0

PKG_BUILDDIR=$(CURDIR)/bin

# manually set some RIOT env vars, so this Makefile can be called stand-alone
RIOTBASE ?= $(CURDIR)/../../..
RIOTTOOLS ?= $(CURDIR)/..
GITCACHE ?= $(RIOTTOOLS)/git/git-cache

CMAKE_OPTIONS = \
    -DCMAKE_BUILD_TYPE=Release       \
    -DFLATBUFFERS_BUILD_TESTS=OFF    \
    -DFLATBUFFERS_BUILD_FLATHASH=OFF \
    -DFLATBUFFERS_BUILD_FLATLIB=OFF  \
    #

ifneq (, $(CCACHE))
    CMAKE_OPTIONS += -DCMAKE_CXX_COMPILER_LAUNCHER=ccache
endif

include $(RIOTBASE)/pkg/pkg.mk

all:
	@cd "$(PKG_BUILDDIR)" && env -i PATH="$(PATH)" cmake -G "Unix Makefiles" $(CMAKE_OPTIONS) .
	"$(MAKE)" -C "$(PKG_BUILDDIR)"
	@mv "$(PKG_BUILDDIR)"/flatc $(CURDIR)/flatc

distclean::
	@rm -f $(CURDIR)/flatc<commit_msg>dist/tools/flatc: configure cmake for out-of-source build<commit_after>PKG_NAME=flatc
PKG_URL=https://github.com/google/flatbuffers
PKG_VERSION=9e7e8cbe9f675123dd41b7c62868acad39188cae
PKG_LICENSE=Apache2.0

PKG_BUILDDIR=$(CURDIR)/bin

FLATC_SOURCE_DIR = $(PKG_BUILDDIR)
FLATC_BUILD_DIR = $(PKG_BUILDDIR)/build

# manually set some RIOT env vars, so this Makefile can be called stand-alone
RIOTBASE ?= $(CURDIR)/../../..
RIOTTOOLS ?= $(CURDIR)/..
GITCACHE ?= $(RIOTTOOLS)/git/git-cache

CMAKE_OPTIONS = \
    -DCMAKE_BUILD_TYPE=Release       \
    -DFLATBUFFERS_BUILD_TESTS=OFF    \
    -DFLATBUFFERS_BUILD_FLATHASH=OFF \
    -DFLATBUFFERS_BUILD_FLATLIB=OFF  \
    #

ifneq (, $(CCACHE))
    CMAKE_OPTIONS += -DCMAKE_CXX_COMPILER_LAUNCHER=ccache
endif

include $(RIOTBASE)/pkg/pkg.mk

all:
	@env -i PATH="$(PATH)" cmake -G "Unix Makefiles" $(CMAKE_OPTIONS) -H"$(FLATC_SOURCE_DIR)" -B"$(FLATC_BUILD_DIR)"
	"$(MAKE)" -C "$(FLATC_BUILD_DIR)"
	@mv "$(FLATC_BUILD_DIR)"/flatc $(CURDIR)/flatc

distclean::
	@rm -f $(CURDIR)/flatc
{'fraction_non_alphanumeric': 0.15271195365982096, 'fraction_numerical': 0.02632964718272775, 'mean_word_length': 4.637982195845697, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 2, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '6506920', 'n_tokens_mistral': 860, 'n_tokens_neox': 822, 'n_words': 122}