diff options
-rw-r--r-- | config.tests/arch/arch.pro | 1 | ||||
-rw-r--r-- | config.tests/arch/arch_host.pro | 1 | ||||
-rw-r--r-- | config.tests/arch/write_info.pri | 14 | ||||
-rw-r--r-- | configure.pri | 20 |
4 files changed, 17 insertions, 19 deletions
diff --git a/config.tests/arch/arch.pro b/config.tests/arch/arch.pro index 45a7eb33af..c607898b71 100644 --- a/config.tests/arch/arch.pro +++ b/config.tests/arch/arch.pro @@ -1 +1,2 @@ SOURCES = arch.cpp +include(write_info.pri) diff --git a/config.tests/arch/arch_host.pro b/config.tests/arch/arch_host.pro index cefdbc77ef..ea0d1fa572 100644 --- a/config.tests/arch/arch_host.pro +++ b/config.tests/arch/arch_host.pro @@ -1,2 +1,3 @@ option(host_build) SOURCES = arch.cpp +include(write_info.pri) diff --git a/config.tests/arch/write_info.pri b/config.tests/arch/write_info.pri new file mode 100644 index 0000000000..3b55a63f49 --- /dev/null +++ b/config.tests/arch/write_info.pri @@ -0,0 +1,14 @@ +targetinfofile = $$basename(_PRO_FILE_) +targetinfofile ~= s/pro$/target.txt/ + +win32 { + ext = .exe +} else:android { + file_prefix = lib + ext = .so +} else:wasm { + ext = .wasm +} + +content = $${file_prefix}$${TARGET}$${ext} +write_file($$OUT_PWD/$$targetinfofile, content) diff --git a/configure.pri b/configure.pri index e9fd055854..09c34af4ee 100644 --- a/configure.pri +++ b/configure.pri @@ -266,28 +266,10 @@ defineTest(qtConfTest_architecture) { !qtConfTest_compile($${1}): \ error("Could not determine $$eval($${1}.label). See config.log for details.") - host = $$eval($${1}.host) - isEmpty(host): host = false - file_prefix = - ext = - $$host { - equals(QMAKE_HOST.os, Windows): \ - ext = .exe - } else { - win32 { - ext = .exe - } else:android { - file_prefix = lib - ext = .so - } else:wasm { - ext = .wasm - } - } - test = $$eval($${1}.test) output = $$eval($${1}.output) test_out_dir = $$OUT_PWD/$$basename(QMAKE_CONFIG_TESTS_DIR)/$$test - test_out_file = $$test_out_dir/$$file_prefix$$output$$ext + test_out_file = $$test_out_dir/$$cat($$test_out_dir/$${output}.target.txt) exists($$test_out_file): \ content = $$cat($$test_out_file, blob) else: \ |