From c61313dab1c043302e5ecee525d9053f2fd58616 Mon Sep 17 00:00:00 2001 From: Matthias Krack Date: Tue, 28 Feb 2023 13:48:34 +0100 Subject: [PATCH] Avoid double slashes in path names It seems cmake is still not resilient concerning multiple slashes in path names --- tools/toolchain/scripts/stage1/install_intelmpi.sh | 14 +++++++------- tools/toolchain/scripts/tool_kit.sh | 2 +- 2 files changed, 8 insertions(+), 8 deletions(-) diff --git a/tools/toolchain/scripts/stage1/install_intelmpi.sh b/tools/toolchain/scripts/stage1/install_intelmpi.sh index 6a68c071b3..4db3b00ca6 100755 --- a/tools/toolchain/scripts/stage1/install_intelmpi.sh +++ b/tools/toolchain/scripts/stage1/install_intelmpi.sh @@ -29,15 +29,15 @@ case "${with_intelmpi}" in ;; __SYSTEM__) echo "==================== Finding Intel MPI from system paths ====================" - check_command mpiexec "intelmpi" && MPIRUN="$(command -v mpiexec)" || exit 1 + check_command mpiexec "intelmpi" && MPIRUN="$(realpath $(command -v mpiexec))" || exit 1 if [ "${with_intel}" != "__DONTUSE__" ]; then - check_command mpiicc "intelmpi" && MPICC="$(command -v mpiicc)" || exit 1 - check_command mpiicpc "intelmpi" && MPICXX="$(command -v mpiicpc)" || exit 1 - check_command mpiifort "intelmpi" && MPIFC="$(command -v mpiifort)" || exit 1 + check_command mpiicc "intelmpi" && MPICC="$(realpath $(command -v mpiicc))" || exit 1 + check_command mpiicpc "intelmpi" && MPICXX="$(realpath $(command -v mpiicpc))" || exit 1 + check_command mpiifort "intelmpi" && MPIFC="$(realpath $(command -v mpiifort))" || exit 1 else - check_command mpicc "intelmpi" && MPICC="$(command -v mpicc)" || exit 1 - check_command mpicxx "intelmpi" && MPICXX="$(command -v mpicxx)" || exit 1 - check_command mpifort "intelmpi" && MPIFC="$(command -v mpifort)" || exit 1 + check_command mpicc "intelmpi" && MPICC="$(realpath $(command -v mpicc))" || exit 1 + check_command mpicxx "intelmpi" && MPICXX="$(realpath $(command -v mpicxx))" || exit 1 + check_command mpifort "intelmpi" && MPIFC="$(realpath $(command -v mpifort))" || exit 1 fi MPIFORT="${MPIFC}" MPIF77="${MPIFC}" diff --git a/tools/toolchain/scripts/tool_kit.sh b/tools/toolchain/scripts/tool_kit.sh index b2bbf215fd..431e194934 100644 --- a/tools/toolchain/scripts/tool_kit.sh +++ b/tools/toolchain/scripts/tool_kit.sh @@ -340,7 +340,7 @@ check_command() { local __package=${2} fi if $(command -v ${__command} > /dev/null 2>&1); then - echo "path to ${__command} is $(command -v ${__command})" + echo "path to ${__command} is $(realpath $(command -v ${__command}))" else report_error "Cannot find ${__command}, please check if the package ${__package} is installed or in system search path" return 1