forked from alisw/alidist
-
Notifications
You must be signed in to change notification settings - Fork 0
/
debuggui.sh
53 lines (47 loc) · 1.68 KB
/
debuggui.sh
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
package: DebugGUI
version: "v0.1.0-%(short_hash)s"
tag: 655f92e9c9d0bd89ecb62a15d98d4fd6ada54392
requires:
- "GCC-Toolchain:(?!osx)"
- GLFW
build_requires:
- CMake
source: https://github.com/AliceO2Group/DebugGUI
---
case $ARCHITECTURE in
osx*)
[[ ! $GLFW_ROOT ]] && GLFW_ROOT=`brew --prefix glfw`
;;
esac
# Use ninja if in devel mode, ninja is found and DISABLE_NINJA is not 1
if [[ ! $CMAKE_GENERATOR && $DISABLE_NINJA != 1 && $DEVEL_SOURCES != $SOURCEDIR ]]; then
NINJA_BIN=ninja-build
type "$NINJA_BIN" &> /dev/null || NINJA_BIN=ninja
type "$NINJA_BIN" &> /dev/null || NINJA_BIN=
[[ $NINJA_BIN ]] && CMAKE_GENERATOR=Ninja || true
unset NINJA_BIN
fi
cmake $SOURCEDIR \
-DCMAKE_INSTALL_PREFIX=$INSTALLROOT \
-DCMAKE_EXPORT_COMPILE_COMMANDS=ON
cp ${BUILDDIR}/compile_commands.json ${INSTALLROOT}
cmake --build . -- ${JOBS+-j $JOBS} install
#ModuleFile
mkdir -p etc/modulefiles
cat > etc/modulefiles/$PKGNAME <<EoF
#%Module1.0
proc ModulesHelp { } {
global version
puts stderr "ALICE Modulefile for $PKGNAME $PKGVERSION-@@PKGREVISION@$PKGHASH@@"
}
set version $PKGVERSION-@@PKGREVISION@$PKGHASH@@
module-whatis "ALICE Modulefile for $PKGNAME $PKGVERSION-@@PKGREVISION@$PKGHASH@@"
# Dependencies
module load BASE/1.0 ${GCC_TOOLCHAIN_REVISION:+GCC-Toolchain/$GCC_TOOLCHAIN_VERSION-$GCC_TOOLCHAIN_REVISION} \\
${GLFW_REVISION:+GLFW/$GLFW_VERSION-$GLFW_REVISION}
# Our environment
set DEBUGGUI_ROOT \$::env(BASEDIR)/$PKGNAME/\$version
prepend-path PATH \$DEBUGGUI_ROOT/bin
prepend-path LD_LIBRARY_PATH \$DEBUGGUI_ROOT/lib
EoF
mkdir -p $INSTALLROOT/etc/modulefiles && rsync -a --delete etc/modulefiles/ $INSTALLROOT/etc/modulefiles