mirror of
https://github.com/bensuperpc/dockcross.git
synced 2024-11-10 05:07:26 +01:00
base/cmake: Do not pass toolchain option when using incompatible cmake option
Also revert the changes to ccmake.sh, the restriction doesn't apply to it. Suggested-by: Matt McCormick <matt.mccormick@kitware.com>
This commit is contained in:
parent
ff2512b785
commit
4876f14356
@ -3,12 +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
|
||||
#
|
||||
# Passing of the option can be disabled setting environment variable
|
||||
# DOCKCROSS_PASS_CMAKE_TOOLCHAIN_FILE to 0
|
||||
|
||||
if [ "${DOCKCROSS_PASS_CMAKE_TOOLCHAIN_FILE}" == "0" ];then
|
||||
exec /usr/bin/ccmake "$@"
|
||||
else
|
||||
exec /usr/bin/ccmake -DCMAKE_TOOLCHAIN_FILE:FILEPATH=${CMAKE_TOOLCHAIN_FILE} "$@"
|
||||
fi
|
||||
exec /usr/bin/ccmake -DCMAKE_TOOLCHAIN_FILE:FILEPATH=${CMAKE_TOOLCHAIN_FILE} "$@"
|
||||
|
@ -3,12 +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
|
||||
#
|
||||
# Passing of the option can be disabled setting environment variable
|
||||
# DOCKCROSS_PASS_CMAKE_TOOLCHAIN_FILE to 0
|
||||
|
||||
if [ "${DOCKCROSS_PASS_CMAKE_TOOLCHAIN_FILE}" == "0" ];then
|
||||
# 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 "$@"
|
||||
else
|
||||
exec /usr/bin/cmake -DCMAKE_TOOLCHAIN_FILE:FILEPATH=${CMAKE_TOOLCHAIN_FILE} "$@"
|
||||
fi
|
||||
;;
|
||||
|
||||
esac
|
||||
|
||||
exec /usr/bin/cmake -DCMAKE_TOOLCHAIN_FILE:FILEPATH=${CMAKE_TOOLCHAIN_FILE} "$@"
|
||||
|
@ -25,5 +25,4 @@ COPY linux-x64/${CROSS_TRIPLE}-noop.sh /usr/bin/${CROSS_TRIPLE}-noop
|
||||
|
||||
COPY manylinux-x64/Toolchain.cmake ${CROSS_ROOT}/../lib/
|
||||
ENV CMAKE_TOOLCHAIN_FILE ${CROSS_ROOT}/../lib/Toolchain.cmake
|
||||
ENV DOCKCROSS_PASS_CMAKE_TOOLCHAIN_FILE 0
|
||||
ENV DEFAULT_DOCKCROSS_IMAGE dockcross/manylinux-x64
|
||||
|
Loading…
Reference in New Issue
Block a user