Add flags only for corresponding platforms
set -ex
+if [[ "${target_platform}" == linux-* ]]
+then
# librt is required before glibc 2.17
-if [[ "${target_platform}" == linux-* ]]; then
LDFLAGS="-lrt ${LDFLAGS}"
-fi
# https://github.com/google/highway/pull/524#issuecomment-1025676250
CXXFLAGS="-D__STDC_FORMAT_MACROS ${CXXFLAGS}"
+fi
+if [[ "${target_platform}" == osx-* ]]
+then
# Sized deallocation requires MacOS SDK 10.12+
# https://conda-forge.org/docs/maintainer/knowledge_base.html#newer-c-features-with-old-sdk
-CXXFLAGS="${CXXFLAGS} -D_LIBCPP_DISABLE_AVAILABILITY"
+ CXXFLAGS="-D_LIBCPP_DISABLE_AVAILABILITY ${CXXFLAGS}"
+fi
mkdir build
cd build
