Commit ed8993cb authored by Elliott Slaughter's avatar Elliott Slaughter
Browse files

Refactor Legion build to avoid code duplication.

parent 0faaff0f
......@@ -16,44 +16,27 @@ pushd "$legion_build"
if [[ ${target} = "psbuild"* ]]; then
export LDFLAGS="-Wl,-rpath,$CONDA_ENV_DIR/lib -lhdf5 -lz"
${CONDA_PREFIX}/bin/cmake -DCMAKE_PREFIX_PATH="$CONDA_ENV_DIR" \
-DCMAKE_BUILD_TYPE=$([ $LEGION_DEBUG -eq 1 ] && echo Debug || echo Release) \
-DBUILD_SHARED_LIBS=ON \
-DLegion_BUILD_BINDINGS=ON \
-DLegion_ENABLE_TLS=ON \
-DLegion_USE_Python=ON \
-DPYTHON_EXECUTABLE="$(which python)" \
-DLegion_USE_CUDA=OFF \
-DLegion_USE_OpenMP=ON \
-DLegion_USE_GASNet=$([ $LEGION_USE_GASNET -eq 1 ] && echo ON || echo OFF) \
-DGASNet_ROOT_DIR="$GASNET_ROOT" \
-DGASNet_CONDUITS=$GASNET_CONDUIT \
-DLegion_USE_HDF5=ON \
-DLegion_MAX_DIM=4 \
-DCMAKE_INSTALL_PREFIX="$LEGION_INSTALL_DIR" \
-DCMAKE_INSTALL_LIBDIR="$LEGION_INSTALL_DIR/lib" \
"$root_dir"/legion
alias cmake=${CONDA_PREFIX}/bin/cmake
else
export LDFLAGS="-Wl,-rpath,$CONDA_ENV_DIR/lib"
cmake -DCMAKE_PREFIX_PATH="$CONDA_ENV_DIR" \
-DCMAKE_BUILD_TYPE=$([ $LEGION_DEBUG -eq 1 ] && echo Debug || echo Release) \
-DBUILD_SHARED_LIBS=ON \
-DLegion_BUILD_BINDINGS=ON \
-DLegion_ENABLE_TLS=ON \
-DLegion_USE_Python=ON \
-DPYTHON_EXECUTABLE="$(which python)" \
-DLegion_USE_CUDA=OFF \
-DLegion_USE_OpenMP=ON \
-DLegion_USE_GASNet=$([ $LEGION_USE_GASNET -eq 1 ] && echo ON || echo OFF) \
-DGASNet_ROOT_DIR="$GASNET_ROOT" \
-DGASNet_CONDUITS=$GASNET_CONDUIT \
-DLegion_USE_HDF5=ON \
-DLegion_MAX_DIM=4 \
-DCMAKE_INSTALL_PREFIX="$LEGION_INSTALL_DIR" \
-DCMAKE_INSTALL_LIBDIR="$LEGION_INSTALL_DIR/lib" \
"$root_dir"/legion
fi
cmake -DCMAKE_PREFIX_PATH="$CONDA_ENV_DIR" \
-DCMAKE_BUILD_TYPE=$([ $LEGION_DEBUG -eq 1 ] && echo Debug || echo Release) \
-DBUILD_SHARED_LIBS=ON \
-DLegion_BUILD_BINDINGS=ON \
-DLegion_ENABLE_TLS=ON \
-DLegion_USE_Python=ON \
-DPYTHON_EXECUTABLE="$(which python)" \
-DLegion_USE_CUDA=OFF \
-DLegion_USE_OpenMP=ON \
-DLegion_USE_GASNet=$([ $LEGION_USE_GASNET -eq 1 ] && echo ON || echo OFF) \
-DGASNet_ROOT_DIR="$GASNET_ROOT" \
-DGASNet_CONDUITS=${LEGION_GASNET_CONDUIT:-$GASNET_CONDUIT} \
-DLegion_USE_HDF5=ON \
-DLegion_MAX_DIM=4 \
-DCMAKE_INSTALL_PREFIX="$LEGION_INSTALL_DIR" \
-DCMAKE_INSTALL_LIBDIR="$LEGION_INSTALL_DIR/lib" \
"$root_dir"/legion
popd
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment