device: Check CROSS_COMPILE in deviceSanityCheckCompiler
QMAKE_CXX is initialized by default to gcc. As a result, 'which $QMAKE_CXX' always succeeds. This change removes the 'which' check and makes it explicit that CROSS_COMPILE is a mandatory option to -device mkspecs. Change-Id: Icefa9d14fc24086a60c9108ff7d9d16fd9990995 Done-with: Johannes Zellner Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@nokia.com>
This commit is contained in:
parent
30cf695e7a
commit
b41028aaf3
@ -32,12 +32,14 @@ unset(DIR)
|
|||||||
|
|
||||||
# Provide a function to be used by mkspecs
|
# Provide a function to be used by mkspecs
|
||||||
defineTest(deviceSanityCheckCompiler) {
|
defineTest(deviceSanityCheckCompiler) {
|
||||||
# Check if the binary exists, e.g. with an absolute path
|
# Check if the binary exists with an absolute path
|
||||||
exists($$QMAKE_CXX):return()
|
exists($$QMAKE_CXX):return()
|
||||||
|
|
||||||
# Check if the compiler is in the path
|
# Check for possible reasons of failure
|
||||||
system("which $$QMAKE_CXX > /dev/null"):return()
|
# check if CROSS_COMPILE device-option is set
|
||||||
|
isEmpty(CROSS_COMPILE):error("CROSS_COMPILE needs to be set via -device-option CROSS_COMPILE=<path>")
|
||||||
|
|
||||||
error("Compiler $$QMAKE_CXX not found")
|
# CROSS_COMPILE is an incorrect path
|
||||||
|
error("Compiler $$QMAKE_CXX not found. Check the value of CROSS_COMPILE -device-option")
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user