@@ -73,6 +73,7 @@ args=$(or_die getopt -a -o h --long build-exe-only,cmake-build-type:,code-covera
7373# Variables with default values
7474BUILD_EXE_ONLY=false
7575GEOSX_INSTALL_SCHEMA=true
76+ BUILD_PYGEOSX=true
7677HOST_CONFIG=" host-configs/environment.cmake"
7778RUN_UNIT_TESTS=true
7879RUN_INTEGRATED_TESTS=false
108109 --no-run-unit-tests) RUN_UNIT_TESTS=false; shift ;;
109110 --nproc) NPROC=$2 ; shift 2;;
110111 --repository) GEOS_SRC_DIR=$2 ; shift 2;;
112+ --build_pygeosx) BUILD_PYGEOSX=true; shift ;;
111113 --run-integrated-tests) RUN_INTEGRATED_TESTS=true; shift ;;
112114 --upload-test-baselines) UPLOAD_TEST_BASELINES=true; shift ;;
113115 --code-coverage) CODE_COVERAGE=true; shift ;;
@@ -201,6 +203,15 @@ if [[ "${CODE_COVERAGE}" = true ]]; then
201203fi
202204
203205
206+ PYGEOSX_ARGS=" "
207+ if [[ " ${BUILD_PYGEOSX} " = true ]]; then
208+ echo " Enabling pygeosx."
209+ or_die apt-get install -y python3-dev
210+
211+ PYTHON_EXEC=$( which python3)
212+ PYGEOSX_ARGS=" -DENABLE_PYGEOSX=ON -DPython3_EXECUTABLE=$PYTHON_EXEC "
213+ fi
214+
204215
205216# The -DBLT_MPI_COMMAND_APPEND="--allow-run-as-root;--oversubscribe" option is added for OpenMPI.
206217#
@@ -226,7 +237,8 @@ or_die python3 scripts/config-build.py \
226237 -DGEOSX_INSTALL_SCHEMA=${GEOSX_INSTALL_SCHEMA} \
227238 -DENABLE_COVERAGE=$( [[ " ${CODE_COVERAGE} " = true ]] && echo 1 || echo 0) \
228239 ${SCCACHE_CMAKE_ARGS} \
229- ${ATS_CMAKE_ARGS}
240+ ${ATS_CMAKE_ARGS} \
241+ $PYGEOSX_ARGS
230242
231243# The configuration step is now over, we can now move to the build directory for the build!
232244or_die cd ${GEOSX_BUILD_DIR}
0 commit comments