| # Copyright 2021 The IREE Authors |
| # Licensed under the Apache License v2.0 with LLVM Exceptions. |
| # See https://llvm.org/LICENSE.txt for license information. |
| # SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception |
| # Sets up a CMake build. Requires that BUILD_DIR be set in the environment and |
| # expects to be *sourced* not invoked, since it sets environment variables. |
| # Check these exist and print the versions for later debugging. |
| CMAKE_BIN="${CMAKE_BIN:-$(which cmake)}" |
| IREE_PYTHON3_EXECUTABLE="${IREE_PYTHON3_EXECUTABLE:-$(which python3)}" |
| if [[ -d "${BUILD_DIR}" ]]; then |
| echo "'${BUILD_DIR}' directory already exists. Will use cached results there." |
| echo "'${BUILD_DIR}' directory does not already exist. Creating a new one." |