diff --git a/install.sh b/install.sh index fd495513b0..40946b4612 100755 --- a/install.sh +++ b/install.sh @@ -23,9 +23,8 @@ function display_help() # ################################################# # global variables # ################################################# -default_path=/opt/rocm build_package=false -install_prefix=$default_path +ROCM_PATH=${ROCM_PATH:="/opt/rocm"} build_tests=false run_tests=false run_tests_all=false @@ -103,7 +102,7 @@ while true; do esac done -rocm_path=/opt/rocm/bin +ROCM_BIN_PATH=$ROCM_PATH/bin # /etc/*-release files describe the system if [[ -e "/etc/os-release" ]]; then @@ -177,9 +176,9 @@ fi check_exit_code "$?" if ($build_tests) || (($run_tests) && [[ ! -f ./test/UnitTests ]]); then - CXX=$rocm_path/$compiler $cmake_executable $cmake_common_options -DBUILD_TESTS=ON -DCMAKE_INSTALL_PREFIX=$install_prefix ../../. + CXX=$ROCM_BIN_PATH/$compiler $cmake_executable $cmake_common_options -DBUILD_TESTS=ON -DCMAKE_INSTALL_PREFIX=$ROCM_PATH ../../. else - CXX=$rocm_path/$compiler $cmake_executable $cmake_common_options -DBUILD_TESTS=OFF -DCMAKE_INSTALL_PREFIX=$install_prefix ../../. + CXX=$ROCM_BIN_PATH/$compiler $cmake_executable $cmake_common_options -DBUILD_TESTS=OFF -DCMAKE_INSTALL_PREFIX=$ROCM_PATH ../../. fi check_exit_code "$?"