-
Notifications
You must be signed in to change notification settings - Fork 2
/
configure
executable file
·76 lines (68 loc) · 2.55 KB
/
configure
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
#!/bin/sh
case "$1" in
"--gfortran")
echo "Preparing for a compilation in RELEASE mode with GFORTRAN."
if [ -e build ]; then
echo "Removing the existing build directory."
rm -r build
fi
echo
cmake -Wno-dev -DCMAKE_BUILD_TYPE=Release -DCMAKE_Fortran_COMPILER=gfortran -H. -Bbuild || exit 1 ;;
"--ifort")
echo "Preparing for a compilation in RELEASE mode with IFORT."
if [ -e build ]; then
echo "Removing the existing build directory."
rm -r build
fi
echo
cmake -Wno-dev -DCMAKE_BUILD_TYPE=Release -DCMAKE_Fortran_COMPILER=ifort -H. -Bbuild || exit 1 ;;
"--gfortran-debug")
echo "Preparing for a compilation in DEBUG mode with GFORTRAN."
if [ -e build ]; then
echo "Removing the existing build directory."
rm -r build
fi
echo
cmake -Wno-dev -DCMAKE_BUILD_TYPE=Debug -DCMAKE_Fortran_COMPILER=gfortran -H. -Bbuild || exit 1 ;;
"--ifort-debug")
echo "Preparing for a compilation in DEBUG mode with IFORT."
if [ -e build ]; then
echo "Removing the existing build directory."
rm -r build
fi
echo
cmake -Wno-dev -DCMAKE_BUILD_TYPE=Debug -DCMAKE_Fortran_COMPILER=ifort -H. -Bbuild || exit 1 ;;
"--windows")
echo "Preparing for a compilation in RELEASE mode with MINGW32."
if [ -e build ]; then
echo "Removing the existing build directory."
rm -r build
fi
echo
cmake -Wno-dev -DCMAKE_BUILD_TYPE=Release -DCMAKE_Fortran_COMPILER=x86_64-w64-mingw32-gfortran -DCMAKE_SYSTEM_NAME=Windows -H. -Bbuild || exit 1 ;;
"--docs")
echo "Preparing for generation of DOCUMENTATION with FORD."
echo
cd docs
if [ -e html ]; then
echo "Removing the existing HTML documentation."
rm -r html
fi
ford readme.md || exit 1
echo "Documentation has been generated in the subdirectory 'docs'."
echo "You can now open 'docs/html/index.html' in your web browser."
exit 0 ;;
*)
echo
echo "Usage:"
echo " $0 --gfortran # Build in RELEASE mode using gfortran"
echo " $0 --ifort # Build in RELEASE mode using ifort"
echo " $0 --win64 # Build in RELEASE mode using mingw32"
echo " $0 --gfortran-debug # Build in DEBUG mode using gfortran"
echo " $0 --ifort-debug # Build in DEBUG mode using ifort"
echo " $0 --doc # Build documentation using ford"
exit 0 ;;
esac
echo
echo "Make has been initialized for compilation in the subdirectory 'build'."
echo "You can now type 'cd build' followed by 'make' to compile the project."