diff --git a/conda-recipe/bld.bat b/conda-recipe/bld.bat index c214bcb6..6bf04df0 100755 --- a/conda-recipe/bld.bat +++ b/conda-recipe/bld.bat @@ -25,7 +25,10 @@ cmake .. -G "NMake Makefiles" ^ -DCMAKE_LIBRARY_OUTPUT_DIRECTORY="%SP_DIR%" ^ -DCMAKE_SWIG_OUTDIR="%SP_DIR%" ^ -DPYTHON_VERSION="%PYTHON_VERSION_NUMERIC%" ^ - -DBUILD_LIBRARY=ON + -DBUILD_LIBRARY=OFF ^ + -DWITH_AVX=OFF ^ + -DBoost_USE_STATIC_LIBS=OFF + nmake install :: Add wrappers to path for each Python command line tool diff --git a/conda-recipe/build.sh b/conda-recipe/build.sh index d0d2e258..80f5b4e1 100755 --- a/conda-recipe/build.sh +++ b/conda-recipe/build.sh @@ -3,24 +3,24 @@ mkdir b2 && cd b2 if [[ "${target_platform}" == osx-* ]]; then # See https://conda-forge.org/docs/maintainer/knowledge_base.html#newer-c-features-with-old-sdk CXXFLAGS="${CXXFLAGS} -D_LIBCPP_DISABLE_AVAILABILITY" +else + export CONFIG_ARGS="" fi -cmake \ - -DCMAKE_INSTALL_PREFIX="$PREFIX" \ - -DCMAKE_PREFIX_PATH="$PREFIX" \ - -DBUILD_PYTHON_INTERFACE=ON \ - -DCMAKE_BUILD_TYPE=Release \ - -DCMAKE_LIBRARY_OUTPUT_DIRECTORY="$SP_DIR" \ - -DCMAKE_SWIG_OUTDIR="$SP_DIR" \ - -DBUILD_LIBRARY=ON \ - -DPYTHON_VERSION=$(python -c 'import platform; print(platform.python_version())')\ - -G Ninja .. +cmake -S .. -B . \ + -DCMAKE_CXX_COMPILER="${CXX}" \ + -DCMAKE_INSTALL_PREFIX="$PREFIX" \ + -DBUILD_PYTHON_INTERFACE=ON \ + -DCMAKE_BUILD_TYPE=Release \ + -DBUILD_LIBRARY=OFF \ + -DWITH_AVX=OFF \ + -Boost_USE_STATIC_LIBS=OFF \ + -DPYTHON_VERSION=$(python -c 'import platform; print(platform.python_version())')\ + -G Ninja \ + "${CONFIG_ARGS}" -# On some platforms (notably aarch64 with Drone) builds can fail due to -# running out of memory. If this happens, try the build again; if it -# still fails, restrict to one core. -ninja install -k 0 || ninja install -k 0 || ninja install -j 1 +ninja install -j ${CPU_COUNT} # Copy programs to bin -cd $PREFIX/bin -cp $SRC_DIR/bin/* . \ No newline at end of file +chmod 0755 $SRC_DIR/bin/* +cp -f $SRC_DIR/bin/* $PREFIX/bin