Skip to content

Commit

Permalink
CI:check if CMAKE_INSTALL_PREFIX is set, if cmake --install is exec…
Browse files Browse the repository at this point in the history
…uted
  • Loading branch information
SimeonEhrig authored and psychocoderHPC committed Jan 7, 2025
1 parent b731b18 commit 0530df5
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 0 deletions.
1 change: 1 addition & 0 deletions script/gitlabci/job_analysis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ linux_clang-14_debug_analysis:
ALPAKA_CI_CLANG_VER: 14
ALPAKA_CI_STDLIB: libc++
CMAKE_BUILD_TYPE: Debug
CMAKE_INSTALL_PREFIX: ${CI_PROJECT_DIR}/_install
ALPAKA_BOOST_VERSION: 1.80.0
ALPAKA_CI_CMAKE_VER: 3.25.3
alpaka_CXX_STANDARD: 20
Expand Down
8 changes: 8 additions & 0 deletions script/run_install.sh
Original file line number Diff line number Diff line change
Expand Up @@ -8,11 +8,19 @@
set +xv
source ./script/setup_utilities.sh

: "${CMAKE_INSTALL_PREFIX?'CMAKE_INSTALL_PREFIX must be specified, otherwise install folder is unspecified'}"

if [ "$CMAKE_INSTALL_PREFIX" = "" ]; then
echo_red "ERROR: CMAKE_INSTALL_PREFIX is empty"
exit 1
fi

echo_green "<SCRIPT: run_install>"

ALPAKA_CI_CMAKE_EXECUTABLE=cmake
if [ "$ALPAKA_CI_OS_NAME" = "Linux" ]
then
: "${ALPAKA_CI_CMAKE_DIR?'ALPAKA_CI_CMAKE_DIR must be specified'}"
ALPAKA_CI_CMAKE_EXECUTABLE="${ALPAKA_CI_CMAKE_DIR}/bin/cmake"
fi

Expand Down
2 changes: 2 additions & 0 deletions script/set_default_env_vars.sh
Original file line number Diff line number Diff line change
Expand Up @@ -3,3 +3,5 @@
# set default values for unset environment variables

export CMAKE_CXX_EXTENSIONS=${CMAKE_CXX_EXTENSIONS:="ON"}
export CMAKE_INSTALL_PREFIX=${CMAKE_INSTALL_PREFIX:=""}

0 comments on commit 0530df5

Please sign in to comment.