Book a Demo!
CoCalc Logo Icon
StoreFeaturesDocsShareSupportNewsAboutPoliciesSign UpSign In
DLR-AMR
GitHub Repository: DLR-AMR/t8code
Path: blob/main/scripts/configure_for_rtd.sh
900 views
1
#!/bin/bash
2
3
# This file is part of t8code.
4
# t8code is a C library to manage a collection (a forest) of multiple
5
# connected adaptive space-trees of general element types in parallel.
6
#
7
# Copyright (C) 2025 the developers
8
#
9
# t8code is free software; you can redistribute it and/or modify
10
# it under the terms of the GNU General Public License as published by
11
# the Free Software Foundation; either version 2 of the License, or
12
# (at your option) any later version.
13
#
14
# t8code is distributed in the hope that it will be useful,
15
# but WITHOUT ANY WARRANTY; without even the implied warranty of
16
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
17
# GNU General Public License for more details.
18
#
19
# You should have received a copy of the GNU General Public License
20
# along with t8code; if not, write to the Free Software Foundation, Inc.,
21
# 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
22
23
git submodule init
24
git submodule update
25
26
# Remove build directory if it exists
27
if [ -d build ]; then
28
rm -rf build
29
fi
30
31
# Create the build directory
32
mkdir build
33
34
# Navigate into the build directory
35
cd build
36
37
if [ "$READTHEDOCS" = "True" ]; then
38
DOXYFILE_PATH="../doc/Doxyfile.in"
39
if [ ! -f "$DOXYFILE_PATH" ]; then
40
echo "Error: $DOXYFILE_PATH does not exist or is not a regular file."
41
exit 1
42
fi
43
echo "Configuring Doxygen for ReadTheDocs: Excluding source files."
44
# Exclude source files from documentation
45
echo "EXCLUDE_PATTERNS += *.c *.cc *.cpp *.cxx" >> "$DOXYFILE_PATH"
46
fi
47
48
cmake .. -DT8CODE_BUILD_DOCUMENTATION=ON -DT8CODE_BUILD_DOCUMENTATION_SPHINX=ON -DT8CODE_ENABLE_MPI=OFF
49
50
# Return to the parent directory
51
cd ..
52