qt - Force qmake to error out when reading undefined variables -
i need force qmake have set -eu
in bash, this:
$ bash -eu -c 'echo $foo; echo carrying on' bash: foo: unbound variable $ echo $? 1
results in failure, , not print "carrying on".
does qmake support option "reading undefined variable error"?
for qmake variables can use isempty()
is. checking environment variables there dirty hack:
var = $$(foo) isempty(var) { message(empty) } else { message(foo $(foo)) }
test:
$ qmake project message: empty $ foo=test qmake project message: foo test
Comments
Post a Comment