Skip to content
Open
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
6 changes: 6 additions & 0 deletions build_tsmp2.sh
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,7 @@ function help_tsmp2() {
echo " --install_dir Set install dir cmake, if not set bin/<SYSTEMNAME>_<model-id> is used. Model executables and libraries will be installed here"
echo " --clean_first Delete build_dir if it already exists"
echo " --env Set model environment."
echo " --max_jobs Set the maximum number of jobs to build the code, if not set compilation is serial."
echo ""
echo "Example: $0 --ICON --eCLM --ParFlow"
exit 1
Expand Down Expand Up @@ -124,6 +125,7 @@ while [[ "$#" -gt 0 ]]; do
--build_dir) build_dir="$2"; shift ;;
--install_dir) install_dir="$2"; shift ;;
--env) env="$2"; shift ;;
--max_jobs) max_jobs="$2"; shift ;;
*) echo "Unknown parameter passed: $1"; exit 1 ;;
esac
shift
Expand Down Expand Up @@ -290,6 +292,10 @@ else
fi
mkdir -p "${cmake_install_dir}"

if [ -v max_jobs ]; then
export CMAKE_BUILD_PARALLEL_LEVEL=${max_jobs}
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

CMAKE_BUILD_PARALLEL_LEVEL can trigger intercomponent parallel builds which we don't want (see #62)

fi

#
# 5. CMake configure
#
Expand Down