#!/bin/bash
#
# This file is part of Builder.
#
# Builder is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation, either version 3 of the License, or
# (at your option) any later version.
#
# Builder is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with Builder.  If not, see <https://www.gnu.org/licenses/>.
#

# NEST Simulator 2.20.2

log_warning "!!! NOTE: Building from release tar-ball, which is different from the DOI version!"
URL='https://github.com/nest/nest-simulator/archive/refs/tags/v2.20.2.tar.gz'

CMAKEFLAGS="-Dwith-python=OFF"
if which python; then
	PYTHON="$(which python3)"
	CMAKEFLAGS="-Dwith-python=3"
fi

CMAKEFLAGS+=" -Dwith-boost=ON"
CMAKEFLAGS+=" -DCMAKE_CXX_COMPILER=mpic++ -DCMAKE_C_COMPILER=mpicc -Dwith-ltdl=ON -Dwith-detailed-timers=ON -Dwith-mpi=ON"
source "$(dirname "${PLAN}")/../common"
