Export architecture config test variables
Export the architecture configuration variables from QtBase. There are other modules that require access to this information in order to enable certain features (e.g: qml_jit in QtDeclarative). Change-Id: If2c7f29ccb1c0b0a0db3d78ad133a2a6be12b5ad Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
This commit is contained in:
parent
87078650a5
commit
b4bd6eaf92
@ -1,6 +1,6 @@
|
|||||||
include(CheckCXXSourceCompiles)
|
include(CheckCXXSourceCompiles)
|
||||||
|
|
||||||
function(run_config_test_architecture)
|
function(run_config_test_architecture)
|
||||||
|
set(qt_base_configure_tests_vars_to_export)
|
||||||
# Test architecture
|
# Test architecture
|
||||||
set(_arch_file "${CMAKE_CURRENT_BINARY_DIR}/architecture_test")
|
set(_arch_file "${CMAKE_CURRENT_BINARY_DIR}/architecture_test")
|
||||||
try_compile(_arch_result "${CMAKE_CURRENT_BINARY_DIR}"
|
try_compile(_arch_result "${CMAKE_CURRENT_BINARY_DIR}"
|
||||||
@ -38,12 +38,16 @@ function(run_config_test_architecture)
|
|||||||
|
|
||||||
set(TEST_architecture 1 CACHE INTERNAL "Ran the architecture test")
|
set(TEST_architecture 1 CACHE INTERNAL "Ran the architecture test")
|
||||||
set(TEST_architecture_arch "${_architecture}" CACHE INTERNAL "Target machine architecture")
|
set(TEST_architecture_arch "${_architecture}" CACHE INTERNAL "Target machine architecture")
|
||||||
|
list(APPEND qt_base_configure_tests_vars_to_export TEST_architecture_arch)
|
||||||
set(TEST_subarch 1 CACHE INTERNAL "Ran machine subArchitecture test")
|
set(TEST_subarch 1 CACHE INTERNAL "Ran machine subArchitecture test")
|
||||||
foreach(it ${_sub_architecture})
|
foreach(it ${_sub_architecture})
|
||||||
# Equivalent to qmake's QT_CPU_FEATURES.$arch.
|
# Equivalent to qmake's QT_CPU_FEATURES.$arch.
|
||||||
set(TEST_arch_${TEST_architecture_arch}_subarch_${it} 1 CACHE INTERNAL "Target sub architecture result")
|
set(TEST_arch_${TEST_architecture_arch}_subarch_${it} 1 CACHE INTERNAL "Target sub architecture result")
|
||||||
|
list(APPEND qt_base_configure_tests_vars_to_export TEST_arch_${TEST_architecture_arch}_subarch_${it})
|
||||||
endforeach()
|
endforeach()
|
||||||
set(TEST_buildAbi "${_build_abi}" CACHE INTERNAL "Target machine buildAbi")
|
set(TEST_buildAbi "${_build_abi}" CACHE INTERNAL "Target machine buildAbi")
|
||||||
|
list(APPEND qt_base_configure_tests_vars_to_export TEST_buildAbi)
|
||||||
|
set(qt_base_configure_tests_vars_to_export ${qt_base_configure_tests_vars_to_export} CACHE INTERNAL "Test variables that should be exported")
|
||||||
endfunction()
|
endfunction()
|
||||||
|
|
||||||
|
|
||||||
|
@ -22,3 +22,6 @@ set(QT_WILL_INSTALL @QT_WILL_INSTALL@ CACHE BOOL
|
|||||||
|
|
||||||
set(QT_SOURCE_TREE "@QT_SOURCE_TREE@" CACHE PATH
|
set(QT_SOURCE_TREE "@QT_SOURCE_TREE@" CACHE PATH
|
||||||
"A path to the source tree of the previously configured QtBase project." FORCE)
|
"A path to the source tree of the previously configured QtBase project." FORCE)
|
||||||
|
|
||||||
|
# Extra set of exported variables
|
||||||
|
@QT_EXTRA_BUILD_INTERNALS_VARS@
|
||||||
|
@ -265,6 +265,10 @@ endfunction()
|
|||||||
|
|
||||||
function(qt_generate_build_internals_extra_cmake_code)
|
function(qt_generate_build_internals_extra_cmake_code)
|
||||||
if(PROJECT_NAME STREQUAL "QtBase")
|
if(PROJECT_NAME STREQUAL "QtBase")
|
||||||
|
set(QT_EXTRA_BUILD_INTERNALS_VARS)
|
||||||
|
foreach(var IN LISTS qt_base_configure_tests_vars_to_export)
|
||||||
|
string(APPEND QT_EXTRA_BUILD_INTERNALS_VARS "set(${var} \"${${var}}\" CACHE INTERNAL \"\")\n")
|
||||||
|
endforeach()
|
||||||
|
|
||||||
set(QT_SOURCE_TREE "${QtBase_SOURCE_DIR}")
|
set(QT_SOURCE_TREE "${QtBase_SOURCE_DIR}")
|
||||||
qt_path_join(extra_file_path
|
qt_path_join(extra_file_path
|
||||||
|
Loading…
Reference in New Issue
Block a user