CMake: Add additional info which was missing in qconfig.pri
Mostly compiler version numbers. Task-number: QTBUG-84781 Change-Id: I10e92fdfd4e603c9b763a51a0e09b6c4a2c75ac7 Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>
This commit is contained in:
parent
3452b08df6
commit
435fe4b13d
@ -1105,6 +1105,42 @@ function(qt_generate_global_config_pri_file)
|
||||
if(QT_NAMESPACE)
|
||||
list(APPEND extra_statements "QT_NAMESPACE = ${QT_NAMESPACE}")
|
||||
endif()
|
||||
# TODO: Add libinfix support.
|
||||
|
||||
# TODO: Add QT_EMCC_VERSION when WASM is ported over.
|
||||
if(APPLECLANG)
|
||||
set(compiler_version_major_var_name "QT_APPLE_CLANG_MAJOR_VERSION")
|
||||
set(compiler_version_minor_var_name "QT_APPLE_CLANG_MINOR_VERSION")
|
||||
set(compiler_version_patch_var_name "QT_APPLE_CLANG_PATCH_VERSION")
|
||||
elseif(CLANG)
|
||||
set(compiler_version_major_var_name "QT_CLANG_MAJOR_VERSION")
|
||||
set(compiler_version_minor_var_name "QT_CLANG_MINOR_VERSION")
|
||||
set(compiler_version_patch_var_name "QT_CLANG_PATCH_VERSION")
|
||||
elseif(GCC)
|
||||
set(compiler_version_major_var_name "QT_GCC_MAJOR_VERSION")
|
||||
set(compiler_version_minor_var_name "QT_GCC_MINOR_VERSION")
|
||||
set(compiler_version_patch_var_name "QT_GCC_PATCH_VERSION")
|
||||
elseif(ICC)
|
||||
set(compiler_version_major_var_name "QT_ICC_MAJOR_VERSION")
|
||||
set(compiler_version_minor_var_name "QT_ICC_MINOR_VERSION")
|
||||
set(compiler_version_patch_var_name "QT_ICC_PATCH_VERSION")
|
||||
elseif(MSVC)
|
||||
set(compiler_version_major_var_name "QT_MSVC_MAJOR_VERSION")
|
||||
set(compiler_version_minor_var_name "QT_MSVC_MINOR_VERSION")
|
||||
set(compiler_version_patch_var_name "QT_MSVC_PATCH_VERSION")
|
||||
endif()
|
||||
|
||||
if(compiler_version_major_var_name)
|
||||
list(APPEND extra_statements
|
||||
"${compiler_version_major_var_name} = ${QT_COMPILER_VERSION_MAJOR}")
|
||||
list(APPEND extra_statements
|
||||
"${compiler_version_minor_var_name} = ${QT_COMPILER_VERSION_MINOR}")
|
||||
list(APPEND extra_statements
|
||||
"${compiler_version_patch_var_name} = ${QT_COMPILER_VERSION_PATCH}")
|
||||
endif()
|
||||
|
||||
list(APPEND extra_statements "QT_EDITION = Open Source")
|
||||
|
||||
if(extra_statements)
|
||||
string (REPLACE ";" "\n" extra_statements "${extra_statements}")
|
||||
endif()
|
||||
|
@ -30,6 +30,7 @@ qt_set01(MACOS APPLE AND NOT UIKIT)
|
||||
|
||||
qt_set01(GCC CMAKE_CXX_COMPILER_ID STREQUAL "GNU")
|
||||
qt_set01(CLANG CMAKE_CXX_COMPILER_ID MATCHES "Clang")
|
||||
qt_set01(APPLECLANG CMAKE_CXX_COMPILER_ID MATCHES "AppleClang")
|
||||
qt_set01(ICC CMAKE_C_COMPILER MATCHES "icc|icl")
|
||||
qt_set01(QCC CMAKE_C_COMPILER MATCHES "qcc") # FIXME: How to identify this?
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user