Skip to content

Commit

Permalink
configure: enable inline tests to contain auxiliary files
Browse files Browse the repository at this point in the history
... and use that to migrate the pch test.

Change-Id: I2ce884442cab6124c37142f571cf6f82191ee4f5
Reviewed-by: Joerg Bornemann <[email protected]>
  • Loading branch information
ossilator committed Dec 19, 2018
1 parent b6cd5fd commit 73b8769
Show file tree
Hide file tree
Showing 5 changed files with 20 additions and 50 deletions.
1 change: 0 additions & 1 deletion config.tests/common/pch/header.h

This file was deleted.

4 changes: 0 additions & 4 deletions config.tests/common/pch/pch.pro

This file was deleted.

44 changes: 0 additions & 44 deletions config.tests/common/pch/source.cpp

This file was deleted.

16 changes: 15 additions & 1 deletion configure.json
Original file line number Diff line number Diff line change
Expand Up @@ -324,7 +324,21 @@
"precompile_header": {
"label": "precompiled header support",
"type": "compile",
"test": "common/pch"
"test": {
"files": {
"header.h": "#define HEADER_H"
},
"tail": [
"#ifndef HEADER_H",
"#error no go",
"#endif"
],
"qmake": [
"CONFIG += precompile_header",
"PRECOMPILED_DIR = .pch",
"PRECOMPILED_HEADER = header.h"
]
}
},
"use_gold_linker": {
"label": "gold linker",
Expand Down
5 changes: 5 additions & 0 deletions mkspecs/features/qt_configure.prf
Original file line number Diff line number Diff line change
Expand Up @@ -1170,6 +1170,11 @@ defineTest(qtConfPrepareCompileTestSource) {
"}"
write_file($$test_dir/main.$$suffix, contents)|error()

for (test, tests) {
for (file, $$qtConfScalarOrList($${test}.test.files._KEYS_)): \
write_file($$test_dir/$$file, $$qtConfScalarOrList($${test}.test.files.$${file}))|error()
}

# Create stub .pro file
contents = "SOURCES = main.$$suffix"
# Custom project code
Expand Down

0 comments on commit 73b8769

Please sign in to comment.