-
-
Notifications
You must be signed in to change notification settings - Fork 5k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add activate/deactivate like in toolchain example
- Loading branch information
Showing
4 changed files
with
92 additions
and
12 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,54 @@ | ||
#!/bin/bash | ||
|
||
#export CPPFLAGS="-I${PREFIX}/include ${CPPFLAGS}" | ||
#export LDFLAGS="-L${PREFIX}/lib ${LDFLAGS}" | ||
#export LFLAGS="-fPIC ${LFLAGS}" | ||
|
||
if [ "$(uname)" == "Darwin" ] | ||
then | ||
#if [ "$(uname)" == "Darwin" ]; then | ||
# export CXXFLAGS="${CXXFLAGS} -fno-common" | ||
# export MACOSX_DEPLOYMENT_TARGET=$(sw_vers -productVersion | sed -E "s/([0-9]+\.[0-9]+).*/\1/") | ||
# export DYLD_FALLBACK_LIBRARY_PATH=${PREFIX}/lib | ||
# export LDFLAGS="${LDFLAGS} -lpython" | ||
#fi | ||
|
||
# for Mac OSX | ||
export CC=clang | ||
export CXX=clang++ | ||
export MACOSX_VERSION_MIN="10.9" | ||
This comment has been minimized.
Sorry, something went wrong. |
||
export MACOSX_DEPLOYMENT_TARGET="${MACOSX_VERSION_MIN}" | ||
export CMAKE_OSX_DEPLOYMENT_TARGET="${MACOSX_VERSION_MIN}" | ||
export CFLAGS="${CFLAGS} -mmacosx-version-min=${MACOSX_VERSION_MIN}" | ||
export CXXFLAGS="${CXXFLAGS} -mmacosx-version-min=${MACOSX_VERSION_MIN}" | ||
export CXXFLAGS="${CXXFLAGS} -stdlib=libc++" | ||
export LDFLAGS="${LDFLAGS} -headerpad_max_install_names" | ||
export LDFLAGS="${LDFLAGS} -mmacosx-version-min=${MACOSX_VERSION_MIN}" | ||
export LDFLAGS="${LDFLAGS} -lc++ -lpython" | ||
export LINKFLAGS="${LDFLAGS}" | ||
elif [ "$(uname)" == "Linux" ] | ||
then | ||
# for Linux | ||
export CC=gcc | ||
export CXX=g++ | ||
export CFLAGS="${CFLAGS}" | ||
# Boost wants to enable `float128` support on Linux by default. | ||
# However, we don't install `libquadmath` so it will fail to find | ||
# the needed headers and fail to compile things. Adding this flag | ||
# tells Boost not to support `float128` and avoids this search | ||
# process. As it has confused a few people. We have added it here. | ||
# The idea to add this flag was inspired by this Boost ticked. | ||
# | ||
# https://svn.boost.org/trac/boost/ticket/9240 | ||
# | ||
export CXXFLAGS="${CXXFLAGS} -DBOOST_MATH_DISABLE_FLOAT128" | ||
export LDFLAGS="${LDFLAGS}" | ||
export LINKFLAGS="${LDFLAGS}" | ||
else | ||
echo "This system is unsupported by the toolchain." | ||
exit 1 | ||
fi | ||
|
||
export CFLAGS="${CFLAGS} -m${ARCH} -Wall -pipe -O2 -fPIC" | ||
export CXXFLAGS="${CXXFLAGS} ${CFLAGS}" | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,27 @@ | ||
#!/bin/bash | ||
|
||
if [ "$(uname)" == "Darwin" ]; | ||
then | ||
# for Mac OSX | ||
unset CC | ||
unset CXX | ||
unset MACOSX_VERSION_MIN | ||
unset MACOSX_DEPLOYMENT_TARGET | ||
unset CMAKE_OSX_DEPLOYMENT_TARGET | ||
unset CFLAGS | ||
unset CXXFLAGS | ||
unset LDFLAGS | ||
unset LINKFLAGS | ||
elif [ "$(uname)" == "Linux" ] | ||
then | ||
# for Linux | ||
unset CC | ||
unset CXX | ||
unset CFLAGS | ||
unset CXXFLAGS | ||
unset LDFLAGS | ||
unset LINKFLAGS | ||
else | ||
echo "This system is unsupported by our toolchain." | ||
exit 1 | ||
fi |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sorry I guess I was not clear you need only to use the flags here in your build scripts or you can use the toolchain at build time as a dependency. You do not need an activation step.