<commit_before>#!/bin/sh
################################################################################
# compile.sh
#
# Part of Project Thrill - http://project-thrill.org
#
# Copyright (C) 2016 <NAME> <<EMAIL>>
#
# All rights reserved. Published under the BSD-2 license in the LICENSE file.
################################################################################

set -ex

git submodule init
git submodule update

CMAKE_OPTS=

# try to find a modern C++ compiler
for CMD in g++-5 g++-5.3.0 g++-5.2.0 g++-5.1.0 g++-4.9 g++-4.9.3; do
    if command -v "$CMD" > /dev/null; then
        CMAKE_OPTS="$CMAKE_OPTS -DCMAKE_CXX_COMPILER=$CMD"
        break
    fi
done

# detect number of cores
CORES=$(grep -c ^processor /proc/cpuinfo)
MAKEOPTS=-j$CORES

if [ ! -d "build" ]; then
    mkdir build
fi
cd build
cmake .. $CMAKE_OPTS $@
make $MAKEOPTS
ctest -V

################################################################################<commit_msg>fixing compile.sh on MacOSX<commit_after>#!/bin/sh
################################################################################
# compile.sh
#
# Part of Project Thrill - http://project-thrill.org
#
# Copyright (C) 2016 <NAME> <<EMAIL>>
#
# All rights reserved. Published under the BSD-2 license in the LICENSE file.
################################################################################

set -ex

git submodule init
git submodule update

CMAKE_OPTS=

# try to find a modern C++ compiler
for CMD in g++-5 g++-5.3.0 g++-5.2.0 g++-5.1.0 g++-4.9 g++-4.9.3; do
    if command -v "$CMD" > /dev/null; then
        CMAKE_OPTS="$CMAKE_OPTS -DCMAKE_CXX_COMPILER=$CMD"
        break
    fi
done

# detect number of cores
if [ -e /proc/cpuinfo ]; then
    CORES=$(grep -c ^processor /proc/cpuinfo)
elif [ "$(uname)" == "Darwin" ]; then
    CORES=$(sysctl -n hw.ncpu)
else
    CORES=4
fi
MAKEOPTS=-j$CORES

if [ ! -d "build" ]; then
    mkdir build
fi
cd build
cmake .. $CMAKE_OPTS $@
make $MAKEOPTS
ctest -V

################################################################################
{'fraction_non_alphanumeric': 0.3511002444987775, 'fraction_numerical': 0.020048899755501223, 'mean_word_length': 4.179746835443038, 'pattern_counts': {'":': 0, '<': 9, '<?xml version=': 0, '>': 11, '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': '2909113', 'n_tokens_mistral': 696, 'n_tokens_neox': 643, 'n_words': 187}