Enable the "use" option for library checks that come with a test

The "use" option was so far only available for tests, to define that
the test requires usage of a certain library. Extend this to libraries,
so they can also define that running the test for the library requires
usage of another lib.

Change-Id: I2749c21e27c08ad6e12040590317c06c97f493db
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@qt.io>
This commit is contained in:
Lars Knoll 2016-10-28 11:37:31 +02:00 committed by Oswald Buddenhagen
parent d10c4f08d4
commit cc842ca4aa

View File

@ -602,6 +602,8 @@ defineTest(qtConfHandleLibrary) {
defined($${lpfx}.result, var): return()
qtConfEnsureTestTypeDeps("library")
qtConfTestPrepare_compile($$lpfx)
use_args = $$eval($${lpfx}.literal_args)
qtConfLoadResult($${lpfx}, $$1) {
$$eval($${lpfx}.result): \
@ -636,7 +638,7 @@ defineTest(qtConfHandleLibrary) {
# if the library defines a test, use it to verify the source.
!isEmpty($${lpfx}.test) {
$${lpfx}.literal_args = $$qtConfLibraryArgs($$spfx)
$${lpfx}.literal_args = $$use_args $$qtConfLibraryArgs($$spfx)
$${lpfx}.host = $$eval($${spfx}.host)
!qtConfTest_compile($$lpfx) {
qtLog(" => source failed verification.")