Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add debug mode option to compile_upp.sh #628

Merged
merged 15 commits into from
Feb 10, 2023
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 8 additions & 3 deletions tests/compile_upp.sh
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ set -eu

usage() {
echo
echo "Usage: $0 [-p] [-g] [-w] [-v] [-c] [-i] -h"
echo "Usage: $0 [-p] [-g] [-w] [-v] [-c] [-i] [-d] -h"
echo
echo " -p installation prefix <prefix> DEFAULT: ../install"
echo " -g build with GTG(users with gtg repos. access only) DEFAULT: OFF"
Expand All @@ -17,6 +17,7 @@ usage() {
echo " -w build without WRF-IO DEFAULT: ON"
echo " -v build with cmake verbose DEFAULT: NO"
echo " -c Compiler to use for build DEFAULT: intel"
echo " -d Debug mode of CMAKE_BUILD_TYPE DEFAULT: Release"
echo " -h display this message and quit"
echo
exit 1
Expand All @@ -28,7 +29,8 @@ gtg_opt=" -DBUILD_WITH_GTG=OFF"
wrfio_opt=" -DBUILD_WITH_WRFIO=ON"
compiler="intel"
verbose_opt=""
while getopts ":p:gwc:vhiI" opt; do
debug_opt=""
while getopts ":p:gwc:vhiI:d" opt; do
case $opt in
p)
prefix=$OPTARG
Expand All @@ -51,12 +53,15 @@ while getopts ":p:gwc:vhiI" opt; do
v)
verbose_opt="VERBOSE=1"
;;
d)
debug_opt=" -DCMAKE_BUILD_TYPE=Debug"
;;
h|\?|:)
usage
;;
esac
done
cmake_opts=" -DCMAKE_INSTALL_PREFIX=$prefix"${wrfio_opt}${gtg_opt}${ifi_opt}
cmake_opts=" -DCMAKE_INSTALL_PREFIX=$prefix"${wrfio_opt}${gtg_opt}${ifi_opt}${debug_opt}

source ./detect_machine.sh
if [[ $(uname -s) == Darwin ]]; then
Expand Down