File: compile_cmake.sh

package info (click to toggle)
packmol 1%3A21.0.2-2
  • links: PTS, VCS
  • area: main
  • in suites: trixie
  • size: 3,232 kB
  • sloc: tcl: 7,504; f90: 5,045; fortran: 1,879; makefile: 164; sh: 129; lisp: 94
file content (26 lines) | stat: -rw-r--r-- 646 bytes parent folder | download | duplicates (4)
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
#!/bin/bash

# Fortran compiler to use
export FC=gfortran
# Compiler flags to use
export FFLAGS="-g -O2 -Wall"
#export FFLAGS="-g -O2 -Wall -fbounds-check"
#export FFLAGS="-g -O0 -Wall -fbounds-check"

# Installation directory
export target=$(pwd) # this installs packmol under bin/ in the present directory

# Number of parallel processes in build
export npar=4

# No changes should be necessary hereafter.
if [[ ! -d objdir ]]; then
    mkdir objdir
fi
cd objdir
cmake .. \
      -DCMAKE_INSTALL_PREFIX=${target} \
      -DCMAKE_BUILD_TYPE=Release \
      -DCMAKE_Fortran_FLAGS_RELEASE:STRING="-DNDEBUG"
make -j ${npar} install VERBOSE=1
cd ..