Fix install script to set cmake build type when using g flag
MODIFY
install
install
@@ -27,6 +27,7 @@ install_package=false
build_package=false
build_clients=false
build_release=true
+build_type=Release
build_hip_clang=false
run_tests=false
rocm_path=/opt/rocm
@@ -39,7 +40,7 @@ build_relocatable=false
# check if we have a modern version of getopt that can handle whitespace and long parameters
getopt -T
if [[ $? -eq 4 ]]; then
- GETOPT_PARSE=$(getopt --name "${0}" --longoptions help,install,clients,debug,hip-clang,test,package,relocatable --options hicdtpr -- "$@")
+ GETOPT_PARSE=$(getopt --name "${0}" --longoptions help,install,clients,debug,hip-clang,test,package,relocatable --options hicdtprg -- "$@")
else
echo "Need a new version of getopt"
exit 1
@@ -79,6 +80,7 @@ while true; do
build_relocatable=true
shift ;;
-g|--debug)
+ build_type=Debug
build_release=false
shift ;;
-t|--test)
@@ -146,7 +148,7 @@ if [[ "${build_relocatable}" == true ]]; then
-DROCPRIM_ROOT=${rocm_path}/rocprim ${build_test}\
../../. # or cmake-gui ../.
else
- CXX=$rocm_path/bin/${compiler} ${cmake_executable} ${build_test} ../../. # or cmake-gui ../.
+ CXX=$rocm_path/bin/${compiler} ${cmake_executable} ${build_test} -DCMAKE_BUILD_TYPE=${build_type} ../../. # or cmake-gui ../.
fi
check_exit_code "$?"

Fix install script to set cmake build type when using g flag (#105)