Skip to content

Commit

Permalink
added cmake flags for min osx target to fix warnings (#195)
Browse files Browse the repository at this point in the history
#changelog #osx
  • Loading branch information
ofTheo committed Feb 11, 2021
1 parent 7b1205b commit f11e77c
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 5 deletions.
5 changes: 3 additions & 2 deletions apothecary/formulas/assimp.sh
Original file line number Diff line number Diff line change
Expand Up @@ -97,8 +97,9 @@ function build() {
# cd build_osx
# 32 bit
cmake -G 'Unix Makefiles' $buildOpts \
-DCMAKE_C_FLAGS="-arch arm64 -arch x86_64 -O3 -DNDEBUG -funroll-loops -mmacosx-version-min=${OSX_MIN_SDK_VER}" \
-DCMAKE_CXX_FLAGS="-arch arm64 -arch x86_64 -stdlib=libc++ -O3 -DNDEBUG -funroll-loops -std=c++11 -mmacosx-version-min=${OSX_MIN_SDK_VER}" .
-DCMAKE_OSX_DEPLOYMENT_TARGET=${OSX_MIN_SDK_VER} \
-DCMAKE_C_FLAGS="-arch arm64 -arch x86_64 -O3 -DNDEBUG -funroll-loops" \
-DCMAKE_CXX_FLAGS="-arch arm64 -arch x86_64 -stdlib=libc++ -O3 -DNDEBUG -funroll-loops -std=c++11" .
make assimp -j${PARALLEL_MAKE}

elif [ "$TYPE" == "vs" ] ; then
Expand Down
2 changes: 1 addition & 1 deletion apothecary/formulas/libusb.sh
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,7 @@ function build() {
fi

if [ "$TYPE" == "osx" ] ; then
CFLAGS="-arch arm64 -arch x86_64" ./configure --disable-shared --enable-static
CFLAGS="-arch arm64 -arch x86_64 -mmacosx-version-min=${OSX_MIN_SDK_VER}" ./configure --disable-shared --enable-static
make -j${PARALLEL_MAKE}
fi

Expand Down
4 changes: 2 additions & 2 deletions apothecary/formulas/tess2/tess2.sh
Original file line number Diff line number Diff line change
Expand Up @@ -62,15 +62,15 @@ function build() {
STD_LIB_FLAGS="-stdlib=libc++"
OPTIM_FLAGS="-O3" # choose "fastest" optimisation

export CFLAGS="-arch arm64 -arch x86_64 $OPTIM_FLAGS -DNDEBUG -fPIC -mmacosx-version-min=${OSX_MIN_SDK_VER}"
export CFLAGS="-arch arm64 -arch x86_64 $OPTIM_FLAGS -DNDEBUG -fPIC"
export CPPFLAGS=$CFLAGS
export LINKFLAGS="$CFLAGS $STD_LIB_FLAGS"
export LDFLAGS="$LINKFLAGS"
export CXXFLAGS=$CPPFLAGS

mkdir -p build
cd build
cmake -G 'Unix Makefiles' \
cmake -G 'Unix Makefiles' -DCMAKE_OSX_DEPLOYMENT_TARGET=${OSX_MIN_SDK_VER} \
..
make clean
make -j${PARALLEL_MAKE}
Expand Down

0 comments on commit f11e77c

Please sign in to comment.