echo "WARNING: setting CC and CXX environment variables and target MPI wrapper"
CMAKE_OPTIONS+=" -DCMAKE_CXX_COMPILER:STRING=${MPI_CXX_COMPILER}"
CMAKE_OPTIONS+=" -DCMAKE_C_COMPILER:STRING=${MPI_C_COMPILER}"
+ CMAKE_OPTIONS+=" -DMPI_C_FOUND=$MPI_C_FOUND"
fi
CMAKE_OPTIONS=""
CMAKE_OPTIONS+=" -DUSE_SALOME=ON"
CMAKE_OPTIONS+=" -DGDAL_LIBRARY=$GDALHOME/lib/libgdal.so"
CMAKE_OPTIONS+=" -DGDAL_INCLUDE_DIR=$GDALHOME/include"
-CMAKE_OPTIONS+=" -DTBB_ROOT=$TBB_ROOT_DIR"
-CMAKE_OPTIONS+=" -DTBB_INCLUDE_DIR=$TBB_ROOT_DIR/include"
-CMAKE_OPTIONS+=" -DMPI_C_FOUND=$MPI_C_FOUND"
+if [ ! -z "$TBB_ROOT_DIR" ]; then
+ CMAKE_OPTIONS+=" -DTBB_ROOT=$TBB_ROOT_DIR"
+ CMAKE_OPTIONS+=" -DTBB_INCLUDE_DIR=$TBB_ROOT_DIR/include"
+fi
CMAKE_OPTIONS+=" -DPYTHON_EXECUTABLE=$PYTHONBIN"
CMAKE_OPTIONS+=" -DOTGUI_PYTHON_VERSION=$PYTHON_VERSION"
CMAKE_OPTIONS+=" -DPYTHON_INCLUDE_DIR=$PYTHON_INCLUDE"