summaryrefslogtreecommitdiffstats
path: root/cmake
diff options
context:
space:
mode:
authorAlexandru Croitor <alexandru.croitor@qt.io>2019-03-21 13:14:09 +0100
committerAlexandru Croitor <alexandru.croitor@qt.io>2019-03-21 17:47:01 +0000
commitba7c62eed53b2304c54643cbddc29db887fcd869 (patch)
treed2d91e7c3489c576569df8f7aafb97fdace0952e /cmake
parent25f67fbb073c8bedf26e165f52abacf3e20a6a94 (diff)
Fix sub-architecture (instruction sets / SIMD) handling
In qmake there are at least 2 things to know regarding sub-architectures and instruction sets. Which instruction sets does the compiler know to compile for, represented by the various config.tests and features in qtbase/configure.json. And which instructions sets are enabled by the compiler by default, represented by the configure.json "architecture" test and accessed via QT_CPU_FEATURES.$$arch qmake argument. Before this patch there was some mishandling of the above concepts in CMake code. The former can now be checked in CMake with via TEST_subarch_foo and QT_FEATURE_foo (where foo is sse2, etc). The latter can now be checked by TEST_arch_${TEST_architecture_arch}_subarch_foo (where foo is sse2, etc and the main arch is dynamyicall evaluated). The configurejson2cmake script was adjusted to take care of the above changes, and the cmake files were regenerated as well. Change-Id: Ifbf558242e320cafae50da388eee56fa5de2a50c Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
Diffstat (limited to 'cmake')
-rw-r--r--cmake/QtBaseConfigureTests.cmake3
1 files changed, 2 insertions, 1 deletions
diff --git a/cmake/QtBaseConfigureTests.cmake b/cmake/QtBaseConfigureTests.cmake
index b79a1e3839..5a345cbc3c 100644
--- a/cmake/QtBaseConfigureTests.cmake
+++ b/cmake/QtBaseConfigureTests.cmake
@@ -39,7 +39,8 @@ function(run_config_test_architecture)
set(TEST_architecture_arch "${_architecture}" CACHE INTERNAL "Target machine architecture")
set(TEST_subarch 1 CACHE INTERNAL "Ran machine subArchitecture test")
foreach(it ${_sub_architecture})
- set(TEST_subarch_${it} 1 CACHE INTERNAL "Target sub architecture result")
+ # Equivalent to qmake's QT_CPU_FEATURES.$arch.
+ set(TEST_arch_${TEST_architecture_arch}_subarch_${it} 1 CACHE INTERNAL "Target sub architecture result")
endforeach()
set(TEST_buildAbi "${_build_abi}" CACHE INTERNAL "Target machine buildAbi")
endfunction()