diff options
author | bartus | 2020-06-02 18:22:20 +0200 |
---|---|---|
committer | bartus | 2020-06-02 18:22:20 +0200 |
commit | 5ec45d10dff5aa5a10f0f08b3efd616ee0f5f6af (patch) | |
tree | e87152084781c9075ff7ef42f416542388680226 /PKGBUILD | |
parent | c3376aa6b4e491c88d3d3723b7f646da878a35a8 (diff) | |
download | aur-5ec45d10dff5aa5a10f0f08b3efd616ee0f5f6af.tar.gz |
Allow _BUILD_CUDA to be passed with env
Diffstat (limited to 'PKGBUILD')
-rw-r--r-- | PKGBUILD | 6 |
1 files changed, 3 insertions, 3 deletions
@@ -5,7 +5,7 @@ # shellcheck disable=SC2191 # unsafe array asignment. ####to disable cuda kernel comment out this line -_BUILD_CUDA="on" +_BUILD_CUDA="${_BUILD_CUDA:-ON}" name=colmap #fragment="#commit=5bea89263bf5f3ed623b8e6e6a5f022a0ed9c1de" @@ -20,7 +20,7 @@ license=('GPL') groups=() depends=('cgal' 'ceres-solver' 'gflags' 'suitesparse' 'freeglut' 'glew' 'google-glog' 'freeimage' 'libjpeg' 'boost-libs' 'qt5-base') makedepends=('boost' 'cmake' 'eigen' 'git' 'ninja' 'python-sphinx' ) -if [ "$_BUILD_CUDA" == "on" ] ; then +if [ "$_BUILD_CUDA" == "ON" ] ; then makedepends+=('cuda-sdk') optdepends=('cuda-toolkit: for cuda sfm/mvs acceleration') fi @@ -56,7 +56,7 @@ build() { # determine whether we can precompile CUDA kernels _CUDA_PKG=$(pacman -Qsq cuda 2>/dev/null) || true - if [[ -n "$_CUDA_PKG" && "$_BUILD_CUDA" == "on" ]]; then + if [[ -n "$_CUDA_PKG" && "$_BUILD_CUDA" == "ON" ]]; then _CMAKE_FLAGS+=( -DCUDA_ENABLED=ON -DCUDA_HOST_COMPILER=/opt/cuda/bin/gcc -DCUDA_TOOLKIT_ROOT_DIR=/opt/cuda ) |