-
Notifications
You must be signed in to change notification settings - Fork 3.4k
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
Update diamond recipe #51515
Update diamond recipe #51515
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,22 +1,23 @@ | ||
#!/bin/bash | ||
|
||
sed -i.bak 's/-march=native/-march=x86-64/' CMakeLists.txt | ||
rm -rf *.bak | ||
|
||
mkdir build | ||
cd build | ||
if [[ `uname` == "Darwin" ]]; then | ||
export CONFIG_ARGS="-DCMAKE_FIND_FRAMEWORK=NEVER -DCMAKE_FIND_APPBUNDLE=NEVER" | ||
else | ||
export CONFIG_ARGS="" | ||
fi | ||
|
||
cmake -S. -B build -DCMAKE_BUILD_TYPE=Release \ | ||
-DCMAKE_INSTALL_PREFIX="${PREFIX}" \ | ||
-DCMAKE_CXX_COMPILER="${CXX}" \ | ||
-DCMAKE_CXX_FLAGS="${CXXFLAGS} -O3 -I${PREFIX}/include" \ | ||
-DWITH_ZSTD=ON \ | ||
-DZSTD_LIBRARY="${PREFIX}/lib/libzstd.a" \ | ||
-DZSTD_INCLUDE_DIR="${PREFIX}/include" \ | ||
-DBLAST_LIBRARY_DIR="${PREFIX}/lib/ncbi-blast+" \ | ||
-DCMAKE_OSX_DEPLOYMENT_TARGET="" \ | ||
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. Do not override Setting Apply this diff: -DCMAKE_OSX_DEPLOYMENT_TARGET="" \
|
||
"${CONFIG_ARGS}" | ||
|
||
cmake .. \ | ||
-DCMAKE_INSTALL_PREFIX=$PREFIX \ | ||
-DCMAKE_PREFIX_PATH=$PREFIX \ | ||
-DCMAKE_LIBRARY_PATH="$PREFIX" \ | ||
-DWITH_ZSTD=on \ | ||
-DZSTD_LIBRARY=$PREFIX/lib/libzstd.a \ | ||
-DZSTD_INCLUDE_DIR=$PREFIX/include/ \ | ||
-DBLAST_LIBRARY_DIR=$PREFIX/lib/ncbi-blast+ \ | ||
-DCMAKE_OSX_DEPLOYMENT_TARGET="" | ||
|
||
cmake --build . --config Release --target install | ||
|
||
# Reference link: | ||
# https://github.com/conda/conda-recipes/blob/master/boost/build.sh | ||
cmake --build build --target install -v |
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.
Avoid overriding optimization flags in
CXXFLAGS
Conda-build sets appropriate optimization flags in
CXXFLAGS
. Adding-O3
may conflict with these settings and affect portability. It's recommended not to override optimization levels explicitly.Apply this diff:
-DCMAKE_CXX_FLAGS="${CXXFLAGS} -O3 -I${PREFIX}/include" \ +-DCMAKE_CXX_FLAGS="${CXXFLAGS} -I${PREFIX}/include" \
📝 Committable suggestion