Skip to content

Commit

Permalink
troubleshoot build.sh
Browse files Browse the repository at this point in the history
  • Loading branch information
mariia-zelenskaia authored Jan 26, 2025
1 parent 690e591 commit 26921d7
Showing 1 changed file with 19 additions and 26 deletions.
45 changes: 19 additions & 26 deletions recipes/transannot/build.sh
Original file line number Diff line number Diff line change
@@ -1,32 +1,25 @@
#!/bin/bash -ex

mkdir -p build && pushd build

export INCLUDES="-I${PREFIX}/include"
export LIBPATH="-L${PREFIX}/lib"
export LDFLAGS="${LDFLAGS} -L${PREFIX}/lib"
export CXXFLAGS="${CXXFLAGS} -O3 -I${PREFIX}/include"
#!/bin/bash

ARCH_BUILD=""
case $(uname -m) in
aarch64)
ARCH_OPTS="-DHAVE_ARM8=1"
;;
*)
ARCH_OPTS="-DHAVE_SSE4_1=1"
;;
x86_64) ARCH_BUILD="-DHAVE_AVX2=1" ;;
arm64|aarch64) ARCH_BUILD="-DHAVE_ARM8=1" ;;
esac

if [ "$(uname)" == "Darwin" ]; then
export CMAKE_EXTRA="-DCMAKE_FIND_FRAMEWORK=NEVER -DCMAKE_FIND_APPBUNDLE=NEVER -Wno-dev"
else
export CMAKE_EXTRA="-Wno-dev"
fi
CUDA=0
case $(uname -s) in
Linux) CUDA=1 ;;
Darwin) CUDA=0 ;;
esac

cmake -S .. -B . -DCMAKE_INSTALL_PREFIX="${PREFIX}" \
-DCMAKE_BUILD_TYPE=RELEASE \
-DHAVE_TESTS=0 -DHAVE_MPI=0 "${ARCH_OPTS}" \
-DVERSION_OVERRIDE="${PKG_VERSION}" \
"${CMAKE_EXTRA}"
if [ -z "${ARCH_BUILD}" ]; then
echo "Invalid architecture"
exit 1
fi

cmake --build . --target install -j ${CPU_COUNT} -v
popd
mkdir build
cd build
cmake -DCMAKE_INSTALL_PREFIX="${PREFIX}" -DHAVE_TESTS=0 -DHAVE_MPI=0 ${ARCH_BUILD} -DVERSION_OVERRIDE="${PKG_VERSION}" \
-DCMAKE_CUDA_ARCHITECTURES="75-real;80-real;86-real;89-real;90" -DENABLE_CUDA=${CUDA} ..
make -j${CPU_COUNT} ${VERBOSE_CM}
make install

0 comments on commit 26921d7

Please sign in to comment.