-
Notifications
You must be signed in to change notification settings - Fork 3.3k
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
cd-hit: add osx-arm64 build #52061
cd-hit: add osx-arm64 build #52061
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change | ||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|
@@ -1,26 +1,28 @@ | ||||||||||||
#!/bin/sh | ||||||||||||
#!/bin/bash | ||||||||||||
|
||||||||||||
export CFLAGS="-I$PREFIX/include" | ||||||||||||
export CPPFLAGS="-I$PREFIX/include" | ||||||||||||
export CXXFLAGS="-I$PREFIX/include" | ||||||||||||
export LDFLAGS="-L$PREFIX/lib" | ||||||||||||
mkdir -p $PREFIX/bin | ||||||||||||
|
||||||||||||
export CFLAGS="${CFLAGS} -O3" | ||||||||||||
export CPPFLAGS="${CPPFLAGS} -I$PREFIX/include" | ||||||||||||
export CXXFLAGS="${CXXFLAGS} -O3 -I$PREFIX/include" | ||||||||||||
export LDFLAGS="${LDFLAGS} -L$PREFIX/lib" | ||||||||||||
export CPATH=${PREFIX}/include | ||||||||||||
|
||||||||||||
sed -i.bak 's/^CC =$//g' Makefile | ||||||||||||
sed -i.bak 's/^#LDFLAGS.*//g' Makefile | ||||||||||||
|
||||||||||||
rm -rf *.bak | ||||||||||||
|
||||||||||||
if [[ "$OSTYPE" == "darwin"* ]]; then | ||||||||||||
#Lines below is commented out until fix provided for OPENMP support on OS X for this program | ||||||||||||
|
||||||||||||
CCFLAGS="$CCFLAGS -Wl,-rpath ${PREFIX}/lib -L${PREFIX}/lib -I${PREFIX}/include -fopenmp" | ||||||||||||
sed -i.bak 's/CCFLAGS = -fopenmp/CCFLAGS += -fopenmp/g' Makefile | ||||||||||||
rm -rf *.bak | ||||||||||||
LDFLAGS="$LDFLAGS -stdlib=libc++" | ||||||||||||
|
||||||||||||
make CC=$CXX openmp=no MAX_SEQ=1000000 | ||||||||||||
else | ||||||||||||
make CC=$GXX MAX_SEQ=1000000 | ||||||||||||
fi | ||||||||||||
|
||||||||||||
mkdir -p $PREFIX/bin | ||||||||||||
make install PREFIX=$PREFIX/bin | ||||||||||||
|
||||||||||||
make install PREFIX="$PREFIX/bin" | ||||||||||||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Fix PREFIX path and add error handling. The PREFIX should point to the root prefix directory, not directly to the bin directory. Also, add error checking for the installation step. -make install PREFIX="$PREFIX/bin"
+if ! make install PREFIX="$PREFIX"; then
+ echo "Error: Installation failed"
+ exit 1
+fi 📝 Committable suggestion
Suggested change
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
🛠️ Refactor suggestion
Improve environment variable handling.
The compiler flags setup looks good, but there are two improvements to consider:
📝 Committable suggestion