<commit_before>#!/bin/bash

set -ex

mkdir build
cd build

# enable components explicitly so we get build error when unsatisfied
#  WITH_LOCAL_CONFIG requires libini
#  WITH_SERIAL_BACKEND requires libserialport
cmake_config_args=(
    -DCMAKE_BUILD_TYPE=Release
    -DCMAKE_INSTALL_PREFIX=$PREFIX
    -DCMAKE_INSTALL_LIBDIR=lib
    -DCMAKE_INSTALL_SBINDIR=bin
    -DCSHARP_BINDINGS=OFF
    -DENABLE_PACKAGING=OFF
    -DOSX_INSTALL_FRAMEWORKSDIR=$PREFIX/Library/Frameworks
    -DPYTHON_BINDINGS=OFF
    -DWITH_DOC=OFF
    -DWITH_EXAMPLES=OFF
    -DWITH_MAN=OFF
    -DWITH_NETWORK_BACKEND=ON
    -DWITH_SERIAL_BACKEND=OFF
    -DWITH_TESTS=ON
    -DWITH_USB_BACKEND=ON
    -DWITH_XML_BACKEND=ON
)

if [[ $target_platform == linux* ]] ; then
    cmake_config_args+=(
        -DINSTALL_UDEV_RULE=ON
        -DUDEV_RULES_INSTALL_DIR=$PREFIX/lib/udev/rules.d
        -DWITH_IIOD=ON
        -DWITH_LOCAL_BACKEND=ON
        -DWITH_LOCAL_CONFIG=OFF
        -DWITH_SYSTEMD=OFF
        -DWITH_SYSVINIT=OFF
        -DWITH_UPSTART=OFF
    )
else
    cmake_config_args+=(
        -DWITH_IIOD=OFF
        -DWITH_LOCAL_BACKEND=OFF
    )
fi

cmake .. "${cmake_config_args[@]}"
cmake --build . --config Release -- -j${CPU_COUNT}
cmake --build . --config Release --target install<commit_msg>libiio: Try disabling OSX_PACKAGE as a way of fixing OSX build.<commit_after>#!/bin/bash

set -ex

mkdir build
cd build

# enable components explicitly so we get build error when unsatisfied
#  WITH_LOCAL_CONFIG requires libini
#  WITH_SERIAL_BACKEND requires libserialport
cmake_config_args=(
    -DCMAKE_BUILD_TYPE=Release
    -DCMAKE_INSTALL_PREFIX=$PREFIX
    -DCMAKE_INSTALL_LIBDIR=lib
    -DCMAKE_INSTALL_SBINDIR=bin
    -DCSHARP_BINDINGS=OFF
    -DENABLE_PACKAGING=OFF
    -DPYTHON_BINDINGS=OFF
    -DWITH_DOC=OFF
    -DWITH_EXAMPLES=OFF
    -DWITH_MAN=OFF
    -DWITH_NETWORK_BACKEND=ON
    -DWITH_SERIAL_BACKEND=OFF
    -DWITH_TESTS=ON
    -DWITH_USB_BACKEND=ON
    -DWITH_XML_BACKEND=ON
)

if [[ $target_platform == linux* ]] ; then
    cmake_config_args+=(
        -DINSTALL_UDEV_RULE=ON
        -DUDEV_RULES_INSTALL_DIR=$PREFIX/lib/udev/rules.d
        -DWITH_IIOD=ON
        -DWITH_LOCAL_BACKEND=ON
        -DWITH_LOCAL_CONFIG=OFF
        -DWITH_SYSTEMD=OFF
        -DWITH_SYSVINIT=OFF
        -DWITH_UPSTART=OFF
    )
else
    cmake_config_args+=(
        -DOSX_INSTALL_FRAMEWORKSDIR=$PREFIX/Library/Frameworks
        -DOSX_PACKAGE=OFF
        -DWITH_IIOD=OFF
        -DWITH_LOCAL_BACKEND=OFF
    )
fi

cmake .. "${cmake_config_args[@]}"
cmake --build . --config Release -- -j${CPU_COUNT}
cmake --build . --config Release --target install
{'fraction_non_alphanumeric': 0.09298780487804878, 'fraction_numerical': 0.0, 'mean_word_length': 3.153481012658228, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 0, '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': '7356003', 'n_tokens_mistral': 1025, 'n_tokens_neox': 991, 'n_words': 152}