Merge pull request #38 from jcfr/36-support-disabling-toolchain-cmake-option

36 support disabling toolchain cmake option
This commit is contained in:
Matt McCormick 2016-09-22 11:23:09 -04:00 committed by GitHub
commit 131e6408ee
2 changed files with 17 additions and 0 deletions

View File

@ -3,4 +3,5 @@
# Always pass the CMAKE_TOOLCHAIN_FILE variable to CMake when inside a
# dockcross environment -- the CMAKE_TOOLCHAIN_FILE environmental variable is
# always set in this context
exec /usr/bin/ccmake -DCMAKE_TOOLCHAIN_FILE:FILEPATH=${CMAKE_TOOLCHAIN_FILE} "$@"

View File

@ -3,4 +3,20 @@
# Always pass the CMAKE_TOOLCHAIN_FILE variable to CMake when inside a
# dockcross environment -- the CMAKE_TOOLCHAIN_FILE environmental variable is
# always set in this context
# Exception:
#
# Do not pass the toolchain when calling CMake with these options:
# -E = CMake command mode.
# --build <dir> = Build a CMake-generated project binary tree.
# --find-package = Run in pkg-config like mode.
#
case $1 in
-E|--build|--find-package)
exec /usr/bin/cmake "$@"
;;
esac
exec /usr/bin/cmake -DCMAKE_TOOLCHAIN_FILE:FILEPATH=${CMAKE_TOOLCHAIN_FILE} "$@"