mirror of
https://github.com/bensuperpc/dockcross.git
synced 2026-10-09 12:02:10 +02:00
cmake/ccmake: Provide a mechanism to disable passing of toolchain file
By default the toolchain file is always passed as an option to cmake/ccmake It can be explicitly disabled setting the environment variable DOCKCROSS_PASS_CMAKE_TOOLCHAIN_FILE to 0
This commit is contained in:
1 parent
853f0f41b9
commit
c525ad106e
2 files changed
+18
-2
No files matched your search
@@ -3,4 +3,12 @@
|
||||
# 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} "$@"
|
||||
#
|
||||
# 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
|
||||
+9
-1
@@ -3,4 +3,12 @@
|
||||
# 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/cmake -DCMAKE_TOOLCHAIN_FILE:FILEPATH=${CMAKE_TOOLCHAIN_FILE} "$@"
|
||||
#
|
||||
# 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/cmake "$@"
|
||||
else
|
||||
exec /usr/bin/cmake -DCMAKE_TOOLCHAIN_FILE:FILEPATH=${CMAKE_TOOLCHAIN_FILE} "$@"
|
||||
fi
|
||||
Reference in new issue
Block a user