Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

O2Physics: Add a CMake flag to treat warnings as errors #5516

Merged
merged 1 commit into from
Jun 23, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 3 additions & 8 deletions o2physics.sh
Original file line number Diff line number Diff line change
Expand Up @@ -14,17 +14,11 @@
- alibuild-recipe-tools
source: https://github.com/AliceO2Group/O2Physics
incremental_recipe: |
[[ $ALIBUILD_O2PHYSICS_TESTS ]] && CXXFLAGS="${CXXFLAGS} -Werror -Wno-error=deprecated-declarations"
cmake --build . -- ${JOBS:+-j$JOBS} install
mkdir -p $INSTALLROOT/etc/modulefiles && rsync -a --delete etc/modulefiles/ $INSTALLROOT/etc/modulefiles
---
#!/bin/sh

if [[ $ALIBUILD_O2PHYSICS_TESTS ]]; then
# Impose extra errors.
CXXFLAGS="${CXXFLAGS} -Werror -Wno-error=deprecated-declarations"
fi

# When O2 is built against Gandiva (from Arrow), then we need to use
# -DLLVM_ROOT=$CLANG_ROOT, since O2's CMake calls into Gandiva's
# -CMake, which requires it.
Expand All @@ -39,11 +33,12 @@
${LIBJALIENO2_ROOT:+-DlibjalienO2_ROOT=$LIBJALIENO2_ROOT} \
${CLANG_REVISION:+-DCLANG_EXECUTABLE="$CLANG_ROOT/bin-safe/clang"} \
${CLANG_REVISION:+-DLLVM_LINK_EXECUTABLE="$CLANG_ROOT/bin/llvm-link"} \
${LIBUV_ROOT:+-DLibUV_ROOT=$LIBUV_ROOT}
${LIBUV_ROOT:+-DLibUV_ROOT=$LIBUV_ROOT} \
${ALIBUILD_O2PHYSICS_TESTS:+-DO2PHYSICS_WARNINGS_AS_ERRORS=ON}
cmake --build . -- ${JOBS+-j $JOBS} install

# export compile_commands.json in (taken from o2.sh)
DEVEL_SOURCES="`readlink $SOURCEDIR || echo $SOURCEDIR`"
DEVEL_SOURCES="$(readlink $SOURCEDIR || echo $SOURCEDIR)"

Check notice on line 41 in o2physics.sh

View workflow job for this annotation

GitHub Actions / alidistlint

Double quote to prevent globbing and word splitting. [SC2086]

Check notice on line 41 in o2physics.sh

View workflow job for this annotation

GitHub Actions / alidistlint

Double quote to prevent globbing and word splitting. [SC2086]
if [ "$DEVEL_SOURCES" != "$SOURCEDIR" ]; then
perl -p -i -e "s|$SOURCEDIR|$DEVEL_SOURCES|" compile_commands.json
ln -sf $BUILDDIR/compile_commands.json $DEVEL_SOURCES/compile_commands.json
Expand Down
Loading