Skip to content
Snippets Groups Projects

Compare revisions

Changes are shown as if the source revision was being merged into the target revision. Learn more about comparing revisions.

Source

Select target project
No results found

Target

Select target project
  • yanyong/lidarview
  • varmagayatri610/lidarview
  • antioch45/lidarview
  • LidarView/lidarview
  • xczhanjun/lidarview
  • luhuadong/lidarview
  • chet.nieter/lidarview
7 results
Show changes
Commits on Source (491)
Showing
with 748 additions and 14 deletions
---
Checks: "-*,\
boost-*,\
bugprone-*,\
-bugprone-argument-comment,\
-bugprone-branch-clone,\
-bugprone-easily-swappable-parameters,\
-bugprone-implicit-widening-of-multiplication-result,\
-bugprone-incorrect-roundings,\
-bugprone-macro-parentheses,\
-bugprone-misplaced-widening-cast,\
-bugprone-narrowing-conversions,\
-bugprone-not-null-terminated-result,\
-bugprone-parent-virtual-call,\
-bugprone-reserved-identifier,\
-bugprone-signed-char-misuse,\
-bugprone-sizeof-expression,\
-bugprone-string-constructor,\
-bugprone-suspicious-enum-usage,\
-bugprone-suspicious-include,\
-bugprone-throw-keyword-missing,\
-bugprone-unhandled-self-assignment,\
clang-analyzer-*,\
-clang-analyzer-core.CallAndMessage,\
-clang-analyzer-core.NonNullParamChecker,\
-clang-analyzer-core.NullDereference,\
-clang-analyzer-core.StackAddressEscape,\
-clang-analyzer-core.UndefinedBinaryOperatorResult,\
-clang-analyzer-core.uninitialized.ArraySubscript,\
-clang-analyzer-core.uninitialized.Assign,\
-clang-analyzer-core.uninitialized.Branch,\
-clang-analyzer-core.uninitialized.UndefReturn,\
-clang-analyzer-cplusplus.InnerPointer,\
-clang-analyzer-cplusplus.NewDelete,\
-clang-analyzer-cplusplus.NewDeleteLeaks,\
-clang-analyzer-deadcode.DeadStores,\
-clang-analyzer-optin.cplusplus.UninitializedObject,\
-clang-analyzer-optin.cplusplus.VirtualCall,\
-clang-analyzer-security.FloatLoopCounter,\
-clang-analyzer-security.insecureAPI.DeprecatedOrUnsafeBufferHandling,\
-clang-analyzer-security.insecureAPI.strcpy,\
-clang-analyzer-unix.Malloc,\
-clang-analyzer-unix.MismatchedDeallocator,\
misc-*,\
-misc-no-recursion,\
-misc-non-private-member-variables-in-classes,\
-misc-redundant-expression,\
-misc-unconventional-assign-operator,\
modernize-*,\
-modernize-avoid-c-arrays,\
-modernize-loop-convert,\
-modernize-make-unique,\
-modernize-pass-by-value,\
-modernize-raw-string-literal,\
-modernize-redundant-void-arg,\
-modernize-replace-random-shuffle,\
-modernize-return-braced-init-list,\
-modernize-shrink-to-fit,\
-modernize-use-auto,\
-modernize-use-bool-literals,\
-modernize-use-default-member-init,\
-modernize-use-emplace,\
-modernize-use-equals-delete,\
-modernize-use-trailing-return-type,\
-modernize-use-using,\
-modernize-use-transparent-functors,\
openmp-*,\
performance-*,\
-performance-for-range-copy,\
-performance-inefficient-string-concatenation,\
-performance-inefficient-vector-operation,\
-performance-move-const-arg,\
-performance-no-automatic-move,\
-performance-trivially-destructible,\
-performance-type-promotion-in-math-fn,\
-performance-unnecessary-copy-initialization,\
-performance-unnecessary-value-param,\
portability-*,\
readability-*,\
-readability-braces-around-statements,\
-readability-convert-member-functions-to-static,\
-readability-function-cognitive-complexity,\
-readability-function-size,\
-readability-implicit-bool-conversion,\
-readability-inconsistent-declaration-parameter-name,\
-readability-isolate-declaration,\
-readability-magic-numbers,\
-readability-make-member-function-const,\
-readability-named-parameter,\
-readability-non-const-parameter,\
-readability-qualified-auto,\
-readability-redundant-declaration,\
-readability-redundant-preprocessor,\
-readability-simplify-boolean-expr,\
-readability-static-accessed-through-instance,\
-readability-static-definition-in-anonymous-namespace,\
-readability-string-compare,\
-readability-uppercase-literal-suffix,\
-readability-use-anyofallof,\
-readability-identifier-length,\
"
WarningsAsErrors: "*"
...
variables:
sb_cmake_option_ENABLE_ceres:
value: '-DENABLE_ceres=False'
sb_cmake_option_ENABLE_nanoflann:
value: '-DENABLE_nanoflann=False'
sb_cmake_option_ENABLE_pcl:
value: '-DENABLE_pcl=True'
sb_cmake_option_LIDARVIEW_BUILD_SLAM:
value: '-DLIDARVIEW_BUILD_SLAM=False'
CI_VELODYNEPRIVATE_ENABLE:
value: 'ON'
include:
- project: 'LidarView/lidarview-core'
file: 'CI/.gitlab-ci-for-lidarview.yml'
ref: master
# Metadata shared my many jobs
- local: .gitlab/rules.yml
- local: .gitlab/artifacts.yml
# OS builds.
- local: .gitlab/os-linux.yml
- local: .gitlab/os-windows.yml
stages:
- build
- test
- analyse
################################################################################
# Job declarations
#
# Each job must pull in each of the following keys:
#
# - a "base image"
# - a build script
# - tags for the jobs
# - already provided for upload and CI update jobs
# - rules for when to run the job
#
# Additionally, jobs may also contain:
#
# - artifacts
# - dependency/needs jobs for required jobs
################################################################################
# Linux
ubuntu22-debug:build:
extends:
- .ubuntu22_debug
- .cmake_build_linux
- .linux_builder_tags
- .cmake_build_artifacts
- .run_manually
needs: []
ubuntu22-debug:test:
extends:
- .ubuntu22_debug
- .cmake_test_linux
- .linux_tester_tags
- .cmake_test_artifacts
- .run_automatically
dependencies:
- ubuntu22-debug:build
needs:
- ubuntu22-debug:build
ubuntu22-debug-tidy:build:
extends:
- .ubuntu22_debug_tidy
- .cmake_build_linux
- .linux_builder_tags
- .cmake_tidy_artifacts
- .run_manually
needs: []
clang-format-check:analyse:
extends:
- .ubuntu22
- .clang_format_check
- .linux_tester_tags
- .run_automatically
needs: []
clang-tidy-check:analyse:
extends:
- .ubuntu22
- .clang_tidy_check
- .linux_tester_tags
- .run_automatically
dependencies:
- ubuntu22-debug-tidy:build
needs:
- ubuntu22-debug-tidy:build
# Windows
windows-vs2019:build:
extends:
- .windows_vs2019
- .cmake_build_windows
- .windows_builder_tags
- .cmake_build_artifacts
- .run_manually
needs: []
windows-vs2019:test:
extends:
- .windows_vs2019
- .cmake_test_windows
- .windows_test_tags
- .cmake_test_artifacts
- .run_automatically
dependencies:
- windows-vs2019:build
needs:
- windows-vs2019:build
# Lists of paths for artifacts of various stages.
.cmake_build_artifacts:
artifacts:
expire_in: 1d
# Because build logs are in here, we should always upload artifacts.
when: always
paths:
# Logs of the build
- compile_output.log
# The artifacts of the build.
- build/bin/
- build/lib/
- build/share/
# Python packages go here
- build/lib64/
# Test-data fetched at config time
- build/_data/
# Needed for installation.
- build/CMakeCache.txt
- build/build.ninja
- build/rules.ninja
- build/CMakeFiles/rules.ninja
- build/cmake_install.cmake
- build/**/cmake_install.cmake
# CTest files.
- build/CTestCustom.cmake
- build/CTestTestfile.cmake
- build/**/CTestTestfile.cmake
- build/**/*.h
- build/**/*.hxx
- build/**/*.mod
- build/ExternalData/
- build/Testing/
- build/Testing/Temporary/
.cmake_tidy_artifacts:
artifacts:
expire_in: 1d
# Because build logs are in here, we should always upload artifacts.
when: always
paths:
# Logs of the build
- compile_output.log
- build/compile_commands.json
# The artifacts of Qt generation.
- build/**/*.h
- build/**/*.hxx
.cmake_test_artifacts:
artifacts:
expire_in: 1d
# Tests failing should still upload the artifact for further testing.
when: always
paths:
# Debugging logs
- build/Testing/Temporary/Last*.log
- build/Testing/Temporary/*.png
{
"version": 3,
"cmakeMinimumRequired": {
"major": 3,
"minor": 21,
"patch": 0
},
"configurePresets": [
{
"name": "ci_common",
"binaryDir": "${sourceDir}/build/"
}
],
"testPresets": [
{
"name": "ci_common",
"configurePreset": "ci_common",
"hidden": true,
"output": {"outputOnFailure": true},
"execution": {
"jobs": 1,
"repeat": {"mode": "until-pass", "count": 3},
"timeout": 120,
"noTestsAction": "error"
}
},
{
"name": "ci_ubuntu22_debug",
"inherits": ["ci_common"],
"filter": {
"exclude": {"name": "TestVelodyneHDLPositionReader|TestVelodyneLidarStream_HDL_64_Dual|TestExtractPointSelection"}
}
},
{
"name": "ci_windows_vs2019",
"inherits": ["ci_common"],
"filter": {
"exclude": {"name": "lv|Python|TestVelodyneLidarStream_HDL_64"}
}
}
]
}
\ No newline at end of file
$erroractionpreference = "stop"
$version = "0.27.6"
$sha256sum = "48631671fd26a6f5bb4b6755afb3cd9618194c74b93ec5abd633c22343045134"
$filename = "buildcache-windows"
$tarball = "$filename.zip"
$outdir = $pwd.Path
$outdir = "$outdir\.gitlab"
$ProgressPreference = "SilentlyContinue"
Invoke-WebRequest -Uri "https://github.com/mbitsnbites/buildcache/releases/download/v$version/$tarball" -OutFile "$outdir\$tarball"
$hash = Get-FileHash "$outdir\$tarball" -Algorithm SHA256
if ($hash.Hash -ne $sha256sum) {
exit 1
}
Add-Type -AssemblyName System.IO.Compression.FileSystem
[System.IO.Compression.ZipFile]::ExtractToDirectory("$outdir\$tarball", "$outdir")
$erroractionpreference = "stop"
if (Test-Path env:TRIGGER_MODULE_PATH) {
git -C "$env:TRIGGER_MODULE_PATH" fetch
git -C "$env:TRIGGER_MODULE_PATH" checkout "$env:TRIGGER_MODULE_BRANCH"
git -C "$env:TRIGGER_MODULE_PATH" reset --hard origin/"$env:TRIGGER_MODULE_BRANCH"
git -C "$env:TRIGGER_MODULE_PATH" pull
git -C "$env:TRIGGER_MODULE_PATH" submodule sync --recursive
git -C "$env:TRIGGER_MODULE_PATH" submodule update --init --recursive
git -C "$env:TRIGGER_MODULE_PATH" log --oneline -n1 --no-abbrev
} else {
Write-Output "Using default submodules SHA"
}
#!/bin/sh
set -e
if [ -z "${TRIGGER_MODULE_PATH}" ]; then
echo "Using default submodules SHA"
else
git -C $TRIGGER_MODULE_PATH fetch
git -C $TRIGGER_MODULE_PATH checkout $TRIGGER_MODULE_BRANCH
git -C $TRIGGER_MODULE_PATH reset --hard origin/$TRIGGER_MODULE_BRANCH
git -C $TRIGGER_MODULE_PATH pull
git -C $TRIGGER_MODULE_PATH submodule sync --recursive
git -C $TRIGGER_MODULE_PATH submodule update --init --recursive
git -C $TRIGGER_MODULE_PATH log --oneline -n1 --no-abbrev
fi
#!/bin/bash
set -e
target_repository=""
if [ -z "${TRIGGER_MODULE_PATH}" ]; then
if [ -z "${CI_COMMIT_REF_NAME}" ]; then
echo "Missing CI_COMMIT_REF_NAME env variable"
exit 1
fi
target_repository="."
else
target_repository="$TRIGGER_MODULE_PATH"
fi
cd $target_repository
exit_code=0
current_SHA=$(git rev-parse HEAD)
ancestor_SHA=$(git merge-base $current_SHA origin/master)
modified_files=$(git diff --name-only $ancestor_SHA $current_SHA *.{h,cxx,txx})
declare -a existing_files
for file in $modified_files; do
test -e $file && existing_files+=("$file")
done
if [ ${#existing_files[@]} -eq 0 ]; then
echo "No c++ files detected in changes for clang-format to run against"
else
echo "Performing clang-format check on: ${existing_files[@]}"
clang-format --dry-run -Werror ${existing_files[@]}
exit_code=`echo $?`
fi
exit $exit_code
#!/bin/bash
set -e
if [ -z "${CI_PROJECT_DIR}" ]; then
echo "Missing CI_PROJECT_DIR env variable"
exit 1
fi
target_repository=""
if [ -z "${TRIGGER_MODULE_PATH}" ]; then
if [ -z "${CI_COMMIT_REF_NAME}" ]; then
echo "Missing CI_COMMIT_REF_NAME env variable"
exit 1
fi
target_repository="."
else
target_repository="$TRIGGER_MODULE_PATH"
fi
cd $target_repository
exit_code=0
current_SHA=$(git rev-parse HEAD)
ancestor_SHA=$(git merge-base $current_SHA origin/master)
modified_files=$(git diff --name-only $ancestor_SHA $current_SHA *.{h,cxx,txx})
declare -a existing_files
for file in $modified_files; do
test -e $file && existing_files+=("$file")
done
if [ ${#existing_files[@]} -eq 0 ]; then
echo "No c++ files detected in changes for clang-tidy to run against"
else
# Remove -fno-fat-lto-objects flags (unsupported by clang-tidy)
sed -i 's/-fno-fat-lto-objects //g' $CI_PROJECT_DIR/build/compile_commands.json
echo "Performing clang-format check on: ${existing_files[@]}"
run-clang-tidy -p $CI_PROJECT_DIR/build/ ${existing_files[@]}
exit_code=`echo $?`
fi
exit $exit_code
#!/bin/sh
set -e
readonly mindeps_version="3.12.4"
readonly latest_version="3.21.2"
case "$( uname -s )" in
Linux)
shatool="sha256sum"
mindeps_sha256sum="486edd6710b5250946b4b199406ccbf8f567ef0e23cfe38f7938b8c78a2ffa5f"
mindeps_platform="Linux-x86_64"
latest_sha256sum="d5517d949eaa8f10a149ca250e811e1473ee3f6f10935f1f69596a1e184eafc1"
latest_platform="linux-x86_64"
;;
Darwin)
shatool="shasum -a 256"
mindeps_sha256sum="95d76c00ccb9ecb5cb51de137de00965c5e8d34b2cf71556cf8ba40577d1cff3"
mindeps_platform="Darwin-x86_64"
latest_sha256sum="25e3f439c19185f51136126a06e14b4873243ea1b4a37678881adde05433ae9b"
latest_platform="macos-universal"
;;
*)
echo "Unrecognized platform $( uname -s )"
exit 1
;;
esac
readonly shatool
readonly mindeps_sha256sum
readonly mindeps_platform
readonly latest_sha256sum
readonly latest_platform
use_mindeps=false
if [ "$CI_JOB_STAGE" = "test" ]; then
: # Skip old CMake for testing as some of the features are useful.
elif echo "$CMAKE_CONFIGURATION" | grep -q -e 'mindeps'; then
use_mindeps=true
fi
readonly use_mindeps
if $use_mindeps; then
version="$mindeps_version"
sha256sum="$mindeps_sha256sum"
platform="$mindeps_platform"
else
version="$latest_version"
sha256sum="$latest_sha256sum"
platform="$latest_platform"
fi
readonly version
readonly sha256sum
readonly platform
readonly filename="cmake-$version-$platform"
readonly tarball="$filename.tar.gz"
cd .gitlab
echo "$sha256sum $tarball" > cmake.sha256sum
curl -OL "https://github.com/Kitware/CMake/releases/download/v$version/$tarball"
$shatool --check cmake.sha256sum
tar xf "$tarball"
mv "$filename" cmake
if [ "$( uname -s )" = "Darwin" ]; then
ln -s CMake.app/Contents/bin cmake/bin
fi
if [ "$CI_JOB_NAME" = "build:spack-centos7" ]; then
mkdir -p "$CI_PROJECT_DIR/build/spack"
sed \
-e "s/CMAKE_VERSION/$version/" \
-e "s,CMAKE_PREFIX,$PWD/cmake," \
< "$CI_PROJECT_DIR/Utilities/spack/configs/gitlab-ci/packages.yaml.in" \
> "$CI_PROJECT_DIR/build/spack/packages.yaml"
fi
if ("$ENV{CI_JOB_NAME}" MATCHES "windows")
set(CMAKE_C_COMPILER_LAUNCHER "buildcache" CACHE STRING "")
set(CMAKE_CXX_COMPILER_LAUNCHER "buildcache" CACHE STRING "")
set(CMAKE_CUDA_COMPILER_LAUNCHER "buildcache" CACHE STRING "")
set(paraview_replace_uncacheable_flags ON CACHE BOOL "")
else ()
set(CMAKE_C_COMPILER_LAUNCHER "sccache" CACHE STRING "")
set(CMAKE_CXX_COMPILER_LAUNCHER "sccache" CACHE STRING "")
set(CMAKE_CUDA_COMPILER_LAUNCHER "sccache" CACHE STRING "")
endif ()
# Stock CI builds test everything possible (platforms will disable modules as
# needed).
set(BUILD_ALL_MODULES ON CACHE BOOL "")
set(BUILD_EXAMPLES ON CACHE BOOL "")
set(BUILD_TESTING ON CACHE STRING "")
set(LIDARVIEW_USE_PDAL ON CACHE STRING "")
set(LIDARVIEW_USE_CERES ON CACHE STRING "")
set(LIDARVIEW_USE_NANOFLANN ON CACHE STRING "")
set(LIDARVIEW_USE_YAMLCPP ON CACHE STRING "")
set(LIDARVIEW_USE_OPENCV OFF CACHE STRING "")
# Default to Release builds.
if ("$ENV{CMAKE_BUILD_TYPE}" STREQUAL "")
set(CMAKE_BUILD_TYPE "Release" CACHE STRING "")
else ()
set(CMAKE_BUILD_TYPE "$ENV{CMAKE_BUILD_TYPE}" CACHE STRING "")
endif ()
include("${CMAKE_CURRENT_LIST_DIR}/configure_common.cmake")
set(CMAKE_BUILD_TYPE "Debug" CACHE STRING "")
include("${CMAKE_CURRENT_LIST_DIR}/configure_ubuntu22_debug.cmake")
# Treats warnings as errors
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Werror -Wall -Wextra" CACHE STRING "")
# Ignore deprecation warning to be able to build
set(LIDARVIEW_HIDE_DEPRECATION_WARNINGS ON CACHE BOOL "")
# Create a compilation database for the analize stage (clang-tidy)
set(CMAKE_EXPORT_COMPILE_COMMANDS ON CACHE BOOL "")
include("${CMAKE_CURRENT_LIST_DIR}/configure_common.cmake")
set(lvsb_dir)
if (NOT DEFINED "ENV{LVSB_PATH}")
get_filename_component(lvsb_dir "${CMAKE_CURRENT_LIST_DIR}/../../LVSB-DEPS/install/" ABSOLUTE)
else ()
get_filename_component(lvsb_dir "$ENV{LVSB_PATH}/install/" ABSOLUTE)
endif ()
list(APPEND lvsb_dir "${lvsb_dir}/Python")
message(STATUS "CMAKE_PREFIX_PATH setted to ${lvsb_dir}")
set(CMAKE_PREFIX_PATH "${lvsb_dir}" CACHE PATH "")
set(Boost_USE_STATIC_LIBS OFF CACHE STRING "")
# Treats warnings as errors
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} /WX /W4")
FROM fedora:35
MAINTAINER Timothée Couble <timothee.couble@kitware.com>
COPY install_deps.sh /root/install_deps.sh
RUN sh /root/install_deps.sh
COPY install_paraview.sh /root/install_paraview.sh
RUN sh /root/install_paraview.sh
COPY install_ceres.sh /root/install_ceres.sh
RUN sh /root/install_ceres.sh
COPY install_nanoflann.sh /root/install_nanoflann.sh
RUN sh /root/install_nanoflann.sh
#!/bin/sh
set -e
# Ceres dependencies
dnf install -y --setopt=install_weak_deps=False \
gflags-devel glog-devel atlas-devel
readonly version="2.1.0"
readonly tarball="ceres-solver-$version.tar.gz"
readonly sha256sum="f7d74eecde0aed75bfc51ec48c91d01fe16a6bf16bce1987a7073286701e2fc6"
readonly ceres_root="$HOME/ceres"
readonly ceres_src="$ceres_root/src"
readonly ceres_build_root="$ceres_root/build"
mkdir -p "$ceres_root"
cd "$ceres_root"
echo "$sha256sum $tarball" > ceres.sha256sum
curl -OL "http://ceres-solver.org/ceres-solver-$version.tar.gz"
sha256sum --check ceres.sha256sum
mkdir -p "$ceres_src"
tar -xf "$tarball" -C "$ceres_src" --strip-components 1
ceres_build () {
local prefix="$1"
shift
cmake -GNinja \
-S "$ceres_src" \
-B "$ceres_build_root" \
-DCMAKE_BUILD_TYPE=Release \
-DBUILD_TESTING=OFF \
"-DCMAKE_INSTALL_PREFIX=$prefix" \
"$@"
cmake --build "$ceres_build_root" --target install
}
ceres_build /usr
rm -rf "$ceres_root"
#!/bin/sh
set -e
dnf install -y --setopt=install_weak_deps=False \
glx-utils mesa-dri-drivers mesa-libGL* libxcrypt-compat.x86_64 libxkbcommon \
libxkbcommon-x11
# Install xvfb for offline graphical testing
dnf install -y --setopt=install_weak_deps=False \
xorg-x11-server-Xvfb
# Install extra dependencies for ParaView
dnf install -y --setopt=install_weak_deps=False \
bzip2 patch doxygen git-core git-lfs
# Qt dependencies
dnf install -y --setopt=install_weak_deps=False \
qt5-qtbase-devel qt5-qtbase-private-devel qt5-qttools-devel qt5-qtsvg-devel \
qt5-qtxmlpatterns-devel qt5-qtmultimedia-devel qt5-qttools-static
# GNOME theme requirements
dnf install -y --setopt=install_weak_deps=False \
abattis-cantarell-fonts
# Development tools
dnf install -y --setopt=install_weak_deps=False \
libasan libtsan libubsan clang-tools-extra \
gcc gcc-c++ gcc-gfortran \
ninja-build
# External dependencies
dnf install -y --setopt=install_weak_deps=False \
libXcursor-devel libharu-devel utf8cpp-devel pugixml-devel libtiff-devel \
eigen3-devel double-conversion-devel glew-devel jsoncpp-devel boost-devel \
libpcap-devel gdal-devel PDAL-devel pcl-devel yaml-cpp-devel
# Python dependencies
dnf install -y --setopt=install_weak_deps=False \
python3-twisted python3-autobahn python3 python3-devel python3-numpy \
python3-pandas python3-pandas-datareader python3-sphinx python3-pip \
python3-mpi4py-mpich python3-mpi4py-openmpi python3-matplotlib
python3 -m pip install wslink cftime
dnf clean all
#!/bin/sh
set -e
readonly nanoflann_repo="https://github.com/jlblancoc/nanoflann.git"
readonly nanoflann_commit="v1.4.3"
readonly nanoflann_root="$HOME/nanoflann"
readonly nanoflann_src="$nanoflann_root/src"
readonly nanoflann_build_root="$nanoflann_root/build"
git clone "$nanoflann_repo" "$nanoflann_src"
git -C "$nanoflann_src" checkout "$nanoflann_commit"
nanoflann_build () {
local prefix="$1"
shift
cmake -GNinja \
-S "$nanoflann_src" \
-B "$nanoflann_build_root" \
"-DCMAKE_INSTALL_PREFIX=$prefix" \
"$@"
cmake --build "$nanoflann_build_root" --target install
}
nanoflann_build /usr
rm -rf "$nanoflann_root"
#!/bin/sh
set -e
readonly paraview_repo="https://gitlab.kitware.com/paraview/paraview.git"
readonly paraview_commit="b5bd6d8beff4d9acdce5b44e0da951710809e4ca" # Waiting for new release
readonly paraview_root="$HOME/paraview"
readonly paraview_src="$paraview_root/src"
readonly paraview_build_root="$paraview_root/build"
git clone "$paraview_repo" "$paraview_src" --recursive
git -C "$paraview_src" checkout "$paraview_commit" --recurse-submodules
paraview_build () {
local prefix="$1"
shift
cmake -GNinja \
-S "$paraview_src" \
-B "$paraview_build_root" \
-DCMAKE_BUILD_TYPE=Release \
-DPARAVIEW_BUILD_TESTING=OFF \
-DPARAVIEW_ENABLE_GDAL=ON \
-DPARAVIEW_ENABLE_PDAL=ON \
-DPARAVIEW_ENABLE_LAS=ON \
-DPARAVIEW_USE_VTKM=OFF \
-DPARAVIEW_USE_QT=ON \
-DPARAVIEW_USE_PYTHON=ON \
"-DCMAKE_INSTALL_PREFIX=$prefix" \
"$@"
cmake --build "$paraview_build_root" --target install
}
paraview_build /usr
rm -rf "$paraview_root"