Newer
Older
# ** header v3.0
# This file is a part of the CaosDB Project.
#
# Copyright (C) 2021 IndiScale GmbH <info@indiscale.com>
# Copyright (C) 2021 Daniel Hornung <d.hornung@indiscale.com>
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU Affero General Public License as
# published by the Free Software Foundation, either version 3 of the
# License, or (at your option) any later version.
#
# This program 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 Affero General Public License for more details.
#
# You should have received a copy of the GNU Affero General Public License
# along with this program. If not, see <https://www.gnu.org/licenses/>.
#
# ** end header
# This Makefile depends on an installation with the base dir's Makefile.
#
# Specifically, the libraries must have be installed with Conan.
.PHONY: help
help:
@echo "Targets:"
@echo " pkg - create tar.gz archive of the octave package."
@echo " style - auto-format the source files."
@echo " test - run unit tests."
@echo " doc - create the documentation."
###############################################################################
# Tests #
###############################################################################
test: test_octave test_cpp
.PHONY: test
test_octave:
octave Run_Test.m
.PHONY: test_octave
# && make test || echo "Test(s) failed."; exit 1
$(eval BUILD_DIR ::= $(shell mktemp -d build_XXXXXXXX))
cd $(BUILD_DIR) \
&& conan install ../.. -s "compiler.libcxx=libstdc++11" \
&& cmake -D TEST=On ../.. \
&& make test_detailed \
|| echo "Test(s) failed."; exit 1
# Exit with error if tests fail.
# && make test || make test_detailed || echo "Test(s) failed." ; exit 1
# Cleanup if everything went fine.
rm -r $(BUILD_DIR)