2018-10-24 13:20:27 +00:00
#### Inputs
#### Libraries
2020-08-04 15:24:17 +00:00
qt_find_package ( ZLIB 1.0.8 PROVIDED_TARGETS ZLIB::ZLIB MODULE_NAME global QMAKE_LIB zlib )
qt_find_package ( ZSTD 1.3 PROVIDED_TARGETS ZSTD::ZSTD MODULE_NAME global QMAKE_LIB zstd )
qt_find_package ( WrapDBus1 1.2 PROVIDED_TARGETS dbus-1 MODULE_NAME global QMAKE_LIB dbus )
2020-04-22 19:01:32 +00:00
qt_find_package ( Libudev PROVIDED_TARGETS PkgConfig::Libudev MODULE_NAME global QMAKE_LIB libudev )
2018-10-24 13:20:27 +00:00
#### Tests
2020-06-26 18:45:11 +00:00
# machineTuple
qt_config_compile_test_machine_tuple ( "machine tuple" )
2020-02-13 08:14:09 +00:00
# cxx14
2019-10-17 08:49:44 +00:00
qt_config_compile_test ( cxx14
L A B E L " C + + 1 4 s u p p o r t "
2019-10-21 12:35:57 +00:00
C O D E
2019-10-17 08:49:44 +00:00
" #if __cplusplus > 201103L
/ / C o m p i l e r c l a i m s t o s u p p o r t C + + 1 4 , t r u s t i t
#else
# error __cplusplus must be > 201103L (the value of C++11)
#endif
2021-02-12 11:31:17 +00:00
i n t main ( void )
2019-10-17 08:49:44 +00:00
{
/ * B E G I N T E S T : * /
/ * E N D T E S T : * /
r e t u r n 0 ;
}
"
C X X _ S T A N D A R D 1 4
)
2020-02-13 08:14:09 +00:00
# cxx17
2019-10-17 08:49:44 +00:00
qt_config_compile_test ( cxx17
L A B E L " C + + 1 7 s u p p o r t "
2019-10-21 12:35:57 +00:00
C O D E
2019-10-17 08:49:44 +00:00
" #if __cplusplus > 201402L
/ / C o m p i l e r c l a i m s t o s u p p o r t C + + 1 7 , t r u s t i t
#else
# error __cplusplus must be > 201402L (the value for C++14)
#endif
#include <map> // https://bugs.llvm.org//show_bug.cgi?id=33117
#include <variant>
2021-02-12 11:31:17 +00:00
i n t main ( void )
2019-10-17 08:49:44 +00:00
{
/ * B E G I N T E S T : * /
s t d : : v a r i a n t < i n t > v ( 42 ) ;
i n t i = s t d : : g e t < i n t > ( v ) ;
s t d : : visit ( [](const auto & ) { r e t u r n 1 ; } , v ) ;
/ * E N D T E S T : * /
r e t u r n 0 ;
}
"
C X X _ S T A N D A R D 1 7
)
2021-02-09 12:12:09 +00:00
# cxx20
qt_config_compile_test ( cxx20
L A B E L " C + + 2 0 s u p p o r t "
2019-10-21 12:35:57 +00:00
C O D E
2019-05-28 14:19:42 +00:00
" #if __cplusplus > 201703L
2021-02-09 12:12:09 +00:00
/ / C o m p i l e r c l a i m s t o s u p p o r t C + + 2 0 , t r u s t i t
2019-05-28 14:19:42 +00:00
#else
# error __cplusplus must be > 201703L (the value for C++17)
#endif
2021-02-12 11:31:17 +00:00
i n t main ( void )
2019-05-28 14:19:42 +00:00
{
/ * B E G I N T E S T : * /
/ * E N D T E S T : * /
r e t u r n 0 ;
}
2019-10-17 08:49:44 +00:00
"
C X X _ S T A N D A R D 2 0
2019-05-28 14:19:42 +00:00
)
2019-04-16 14:32:08 +00:00
# precompile_header
qt_config_compile_test ( precompile_header
L A B E L " p r e c o m p i l e d h e a d e r s u p p o r t "
2019-10-21 12:35:57 +00:00
C O D E
2021-02-12 15:40:33 +00:00
" #ifndef HEADER_H
2019-04-16 14:32:08 +00:00
#error no go
#endif
2021-02-12 15:40:33 +00:00
2021-02-12 11:31:17 +00:00
i n t main ( void )
2019-04-16 14:32:08 +00:00
{
/ * B E G I N T E S T : * /
/ * E N D T E S T : * /
r e t u r n 0 ;
}
" # FIXME: qmake: ['CONFIG += precompile_header', 'PRECOMPILED_DIR = .pch', 'PRECOMPILED_HEADER = header.h']
)
2020-08-19 14:49:13 +00:00
qt_config_compiler_supports_flag_test ( use_bfd_linker
L A B E L " b f d l i n k e r "
F L A G " - f u s e - l d = b f d "
)
qt_config_compiler_supports_flag_test ( use_gold_linker
L A B E L " g o l d l i n k e r "
F L A G " - f u s e - l d = g o l d "
)
qt_config_compiler_supports_flag_test ( use_lld_linker
L A B E L " l l d l i n k e r "
F L A G " - f u s e - l d = l l d "
)
qt_config_compiler_supports_flag_test ( optimize_debug
L A B E L " - O g s u p p o r t "
F L A G " - O g "
)
2020-08-21 10:59:24 +00:00
qt_config_linker_supports_flag_test ( enable_new_dtags
L A B E L " n e w d t a g s s u p p o r t "
F L A G " - - e n a b l e - n e w - d t a g s "
)
qt_config_linker_supports_flag_test ( gdb_index
L A B E L " g d b i n d e x s u p p o r t "
F L A G " - - g d b - i n d e x "
)
2018-10-24 13:20:27 +00:00
# reduce_relocations
qt_config_compile_test ( reduce_relocations
L A B E L " - B s y m b o l i c - f u n c t i o n s s u p p o r t "
2019-10-21 12:35:57 +00:00
C O D E
2018-10-24 13:20:27 +00:00
" #if !(defined(__i386) || defined(__i386__) || defined(__x86_64) || defined(__x86_64__) || defined(__amd64))
# error Symbolic function binding on this architecture may be broken, disabling it (see QTBUG-36129).
#endif
2021-02-12 11:31:17 +00:00
i n t main ( void )
2018-10-24 13:20:27 +00:00
{
/ * B E G I N T E S T : * /
/ * E N D T E S T : * /
r e t u r n 0 ;
}
" # FIXME: qmake: ['TEMPLATE = lib', 'CONFIG += dll bsymbolic_functions', 'isEmpty(QMAKE_LFLAGS_BSYMBOLIC_FUNC): error("Nope")']
)
2020-02-26 10:41:20 +00:00
qt_config_compile_test ( "separate_debug_info"
2020-03-16 12:45:53 +00:00
L A B E L " s e p a r a t e d e b u g i n f o r m a t i o n s u p p o r t "
2020-04-03 14:33:24 +00:00
P R O J E C T _ P A T H " $ { C M A K E _ C U R R E N T _ S O U R C E _ D I R } / c o n f i g . t e s t s / s e p a r a t e _ d e b u g _ i n f o "
)
2019-10-11 14:55:55 +00:00
# signaling_nan
qt_config_compile_test ( signaling_nan
L A B E L " S i g n a l i n g N a N f o r d o u b l e s "
2019-10-21 12:35:57 +00:00
C O D E
2019-10-11 14:55:55 +00:00
" #include <limits>
2021-02-12 11:31:17 +00:00
i n t main ( void )
2019-10-11 14:55:55 +00:00
{
/ * B E G I N T E S T : * /
u s i n g B = s t d : : n u m e r i c _ l i m i t s < d o u b l e > ;
static_assert ( B::has_signaling_NaN, \"System lacks signaling NaN\ " ) ;
/ * E N D T E S T : * /
r e t u r n 0 ;
}
" )
2018-10-24 13:20:27 +00:00
# sse2
qt_config_compile_test_x86simd ( sse2 "SSE2 instructions" )
# sse3
qt_config_compile_test_x86simd ( sse3 "SSE3 instructions" )
# ssse3
qt_config_compile_test_x86simd ( ssse3 "SSSE3 instructions" )
# sse4_1
qt_config_compile_test_x86simd ( sse4_1 "SSE4.1 instructions" )
# sse4_2
qt_config_compile_test_x86simd ( sse4_2 "SSE4.2 instructions" )
# aesni
qt_config_compile_test_x86simd ( aesni "AES new instructions" )
# f16c
qt_config_compile_test_x86simd ( f16c "F16C instructions" )
# rdrnd
qt_config_compile_test_x86simd ( rdrnd "RDRAND instruction" )
2019-10-11 14:55:55 +00:00
# rdseed
qt_config_compile_test_x86simd ( rdseed "RDSEED instruction" )
2018-10-24 13:20:27 +00:00
# shani
qt_config_compile_test_x86simd ( shani "SHA new instructions" )
# avx
qt_config_compile_test_x86simd ( avx "AVX instructions" )
# avx2
qt_config_compile_test_x86simd ( avx2 "AVX2 instructions" )
# avx512f
qt_config_compile_test_x86simd ( avx512f "AVX512 F instructions" )
# avx512er
qt_config_compile_test_x86simd ( avx512er "AVX512 ER instructions" )
# avx512cd
qt_config_compile_test_x86simd ( avx512cd "AVX512 CD instructions" )
# avx512pf
qt_config_compile_test_x86simd ( avx512pf "AVX512 PF instructions" )
# avx512dq
qt_config_compile_test_x86simd ( avx512dq "AVX512 DQ instructions" )
# avx512bw
qt_config_compile_test_x86simd ( avx512bw "AVX512 BW instructions" )
# avx512vl
qt_config_compile_test_x86simd ( avx512vl "AVX512 VL instructions" )
# avx512ifma
qt_config_compile_test_x86simd ( avx512ifma "AVX512 IFMA instructions" )
# avx512vbmi
qt_config_compile_test_x86simd ( avx512vbmi "AVX512 VBMI instructions" )
# posix_fallocate
qt_config_compile_test ( posix_fallocate
L A B E L " P O S I X fallocate ( ) "
2019-10-21 12:35:57 +00:00
C O D E
2021-02-12 15:40:33 +00:00
" #include <fcntl.h>
2018-10-24 13:20:27 +00:00
#include <unistd.h>
2021-02-12 11:31:17 +00:00
i n t main ( void )
2018-10-24 13:20:27 +00:00
{
/ * B E G I N T E S T : * /
( v o i d ) posix_fallocate ( 0, 0, 0 ) ;
/ * E N D T E S T : * /
r e t u r n 0 ;
}
" )
# alloca_stdlib_h
qt_config_compile_test ( alloca_stdlib_h
L A B E L " alloca ( ) i n s t d l i b . h "
2019-10-21 12:35:57 +00:00
C O D E
2021-02-12 15:40:33 +00:00
" #include <stdlib.h>
2018-10-24 13:20:27 +00:00
2021-02-12 11:31:17 +00:00
i n t main ( void )
2018-10-24 13:20:27 +00:00
{
/ * B E G I N T E S T : * /
alloca ( 1 ) ;
/ * E N D T E S T : * /
r e t u r n 0 ;
}
" )
# alloca_h
qt_config_compile_test ( alloca_h
L A B E L " alloca ( ) i n a l l o c a . h "
2019-10-21 12:35:57 +00:00
C O D E
2021-02-12 15:40:33 +00:00
" #include <alloca.h>
2018-10-24 13:20:27 +00:00
#ifdef __QNXNTO__
/ / e x t r a i n c l u d e n e e d e d i n Q N X 7 t o d e f i n e N U L L f o r t h e alloca ( ) m a c r o
# include <stddef.h>
#endif
2021-02-12 15:40:33 +00:00
2021-02-12 11:31:17 +00:00
i n t main ( void )
2018-10-24 13:20:27 +00:00
{
/ * B E G I N T E S T : * /
alloca ( 1 ) ;
/ * E N D T E S T : * /
r e t u r n 0 ;
}
" )
# alloca_malloc_h
qt_config_compile_test ( alloca_malloc_h
L A B E L " alloca ( ) i n m a l l o c . h "
2019-10-21 12:35:57 +00:00
C O D E
2021-02-12 15:40:33 +00:00
" #include <malloc.h>
2018-10-24 13:20:27 +00:00
2021-02-12 11:31:17 +00:00
i n t main ( void )
2018-10-24 13:20:27 +00:00
{
/ * B E G I N T E S T : * /
alloca ( 1 ) ;
/ * E N D T E S T : * /
r e t u r n 0 ;
}
" )
# stack_protector
qt_config_compile_test ( stack_protector
L A B E L " s t a c k p r o t e c t i o n "
2020-02-26 09:39:47 +00:00
C O M P I L E _ O P T I O N S - f s t a c k - p r o t e c t o r - s t r o n g
2019-10-21 12:35:57 +00:00
C O D E
2018-10-24 13:20:27 +00:00
" #ifdef __QNXNTO__
# include <sys/neutrino.h>
# if _NTO_VERSION < 700
# error stack-protector not used (by default) before QNX 7.0.0.
# endif
#endif
2021-02-12 11:31:17 +00:00
i n t main ( void )
2018-10-24 13:20:27 +00:00
{
/ * B E G I N T E S T : * /
/ * E N D T E S T : * /
r e t u r n 0 ;
}
2020-02-26 09:39:47 +00:00
" )
2018-10-24 13:20:27 +00:00
2020-05-29 17:01:36 +00:00
# intelcet
qt_config_compile_test ( intelcet
L A B E L " S u p p o r t f o r I n t e l C o n t r o l - f l o w E n f o r c e m e n t T e c h n o l o g y "
C O D E
2021-02-12 15:40:33 +00:00
" i n t main ( void )
2020-05-29 17:01:36 +00:00
{
/ * B E G I N T E S T : * /
#if !defined(__CET__)
# error Intel CET not available
#endif
/ * E N D T E S T : * /
r e t u r n 0 ;
}
" )
2018-10-24 13:20:27 +00:00
#### Features
# This belongs into gui, but the license check needs it here already.
2019-11-29 18:45:38 +00:00
qt_feature ( "android-style-assets" PRIVATE
2018-10-24 13:20:27 +00:00
L A B E L " A n d r o i d S t y l e A s s e t s "
C O N D I T I O N A N D R O I D
)
2020-02-26 12:08:10 +00:00
qt_feature ( "shared" PUBLIC
L A B E L " B u i l d i n g s h a r e d l i b r a r i e s "
2020-09-03 08:29:41 +00:00
A U T O D E T E C T N O T U I K I T A N D N O T W A S M
2020-02-26 12:08:10 +00:00
C O N D I T I O N B U I L D _ S H A R E D _ L I B S
)
2020-03-31 12:12:01 +00:00
qt_feature_definition ( "shared" "QT_STATIC" NEGATE PREREQUISITE "!defined(QT_SHARED) && !defined(QT_STATIC)" )
2020-02-26 12:08:10 +00:00
qt_feature_config ( "shared" QMAKE_PUBLIC_QT_CONFIG )
qt_feature_config ( "shared" QMAKE_PUBLIC_CONFIG )
2020-04-01 20:26:19 +00:00
qt_feature ( "static" PUBLIC
C O N D I T I O N N O T Q T _ F E A T U R E _ s h a r e d
)
qt_feature_config ( "static" QMAKE_PUBLIC_QT_CONFIG )
qt_feature_config ( "static" QMAKE_PUBLIC_CONFIG )
2020-04-16 20:33:14 +00:00
qt_feature ( "cross_compile" PUBLIC
L A B E L " C r o s s c o m p i l i n g "
C O N D I T I O N C M A K E _ C R O S S C O M P I L I N G
)
qt_feature_config ( "cross_compile" QMAKE_PUBLIC_CONFIG )
qt_feature_config ( "cross_compile" QMAKE_PRIVATE_CONFIG )
2020-06-12 17:12:26 +00:00
qt_feature ( "gc_binaries" PRIVATE
C O N D I T I O N N O T Q T _ F E A T U R E _ s h a r e d
)
2019-11-29 18:45:38 +00:00
qt_feature ( "use_bfd_linker"
2021-03-25 19:39:29 +00:00
P R I V A T E # special case
2019-11-29 18:45:38 +00:00
L A B E L " b f d "
A U T O D E T E C T f a l s e
2020-08-19 14:49:13 +00:00
C O N D I T I O N N O T WIN32 A N D N O T I N T E G R I T Y A N D N O T W A S M A N D T E S T _ u s e _ b f d _ l i n k e r
2019-11-29 18:45:38 +00:00
E N A B L E I N P U T _ l i n k e r S T R E Q U A L ' b f d '
D I S A B L E I N P U T _ l i n k e r S T R E Q U A L ' g o l d ' O R I N P U T _ l i n k e r S T R E Q U A L ' l l d '
)
qt_feature_config ( "use_bfd_linker" QMAKE_PRIVATE_CONFIG )
2019-04-16 14:32:08 +00:00
qt_feature ( "use_gold_linker_alias"
A U T O D E T E C T f a l s e
2020-08-19 14:49:13 +00:00
C O N D I T I O N N O T WIN32 A N D N O T I N T E G R I T Y A N D N O T W A S M A N D T E S T _ u s e _ g o l d _ l i n k e r
2019-04-16 14:32:08 +00:00
)
2020-08-20 07:06:16 +00:00
qt_feature ( "use_gold_linker"
2021-03-25 19:39:29 +00:00
P R I V A T E # special case
2020-08-20 07:06:16 +00:00
L A B E L " g o l d "
A U T O D E T E C T f a l s e
C O N D I T I O N N O T WIN32 A N D N O T I N T E G R I T Y A N D N O T W A S M A N D N O T r t e m s A N D T E S T _ u s e _ g o l d _ l i n k e r
E N A B L E I N P U T _ l i n k e r S T R E Q U A L ' g o l d ' O R Q T _ F E A T U R E _ u s e _ g o l d _ l i n k e r _ a l i a s
D I S A B L E I N P U T _ l i n k e r S T R E Q U A L ' b f d ' O R I N P U T _ l i n k e r S T R E Q U A L ' l l d '
)
qt_feature_config ( "use_gold_linker" QMAKE_PRIVATE_CONFIG )
2019-11-29 18:45:38 +00:00
qt_feature ( "use_lld_linker"
2021-03-25 19:39:29 +00:00
P R I V A T E # special case
2019-11-29 18:45:38 +00:00
L A B E L " l l d "
A U T O D E T E C T f a l s e
2020-08-19 14:49:13 +00:00
C O N D I T I O N N O T WIN32 A N D N O T I N T E G R I T Y A N D N O T W A S M A N D T E S T _ u s e _ l l d _ l i n k e r
2019-11-29 18:45:38 +00:00
E N A B L E I N P U T _ l i n k e r S T R E Q U A L ' l l d '
D I S A B L E I N P U T _ l i n k e r S T R E Q U A L ' b f d ' O R I N P U T _ l i n k e r S T R E Q U A L ' g o l d '
)
qt_feature_config ( "use_lld_linker" QMAKE_PRIVATE_CONFIG )
2020-08-20 08:19:32 +00:00
qt_feature ( "optimize_debug"
L A B E L " O p t i m i z e d e b u g b u i l d "
A U T O D E T E C T N O T Q T _ F E A T U R E _ d e v e l o p e r _ b u i l d
C O N D I T I O N N O T MSVC A N D N O T C L A N G AND ( QT_FEATURE_debug OR QT_FEATURE_debug_and_release ) A N D T E S T _ o p t i m i z e _ d e b u g
)
qt_feature_config ( "optimize_debug" QMAKE_PRIVATE_CONFIG )
2020-08-21 06:40:54 +00:00
qt_feature ( "optimize_size"
L A B E L " O p t i m i z e r e l e a s e b u i l d f o r s i z e "
A U T O D E T E C T O F F
C O N D I T I O N N O T Q T _ F E A T U R E _ d e b u g O R Q T _ F E A T U R E _ d e b u g _ a n d _ r e l e a s e
)
qt_feature_config ( "optimize_size" QMAKE_PRIVATE_CONFIG )
2020-10-05 07:09:13 +00:00
# special case begin
qt_feature ( "optimize_full"
L A B E L " F u l l y o p t i m i z e r e l e a s e builds ( -O3 ) "
A U T O D E T E C T O F F
)
qt_feature_config ( "optimize_full" QMAKE_PRIVATE_CONFIG )
2020-10-02 16:24:32 +00:00
qt_feature ( "msvc_obj_debug_info"
L A B E L " E m b e d d e b u g i n f o i n o b j e c t files ( MSVC ) "
C O N D I T I O N MSVC
A U T O D E T E C T O F F
)
qt_feature_config ( "msvc_obj_debug_info" QMAKE_PRIVATE_CONFIG )
2020-10-05 07:09:13 +00:00
# special case end
2020-04-16 05:08:06 +00:00
qt_feature ( "pkg-config" PUBLIC
L A B E L " U s i n g p k g - c o n f i g "
2020-09-28 08:40:47 +00:00
A U T O D E T E C T N O T APPLE A N D N O T WIN32 A N D N O T A N D R O I D
2020-04-16 05:08:06 +00:00
C O N D I T I O N P K G _ C O N F I G _ F O U N D
)
qt_feature_config ( "pkg-config" QMAKE_PUBLIC_QT_CONFIG
N E G A T E )
2019-11-29 18:45:38 +00:00
qt_feature ( "developer-build"
2018-10-24 13:20:27 +00:00
L A B E L " D e v e l o p e r b u i l d "
A U T O D E T E C T O F F
)
2019-03-14 12:22:09 +00:00
qt_feature ( "private_tests" PRIVATE
L A B E L " D e v e l o p e r b u i l d : p r i v a t e _ t e s t s "
2019-07-17 14:10:31 +00:00
C O N D I T I O N Q T _ F E A T U R E _ d e v e l o p e r _ b u i l d
2019-03-14 12:22:09 +00:00
)
2019-11-29 18:45:38 +00:00
qt_feature_definition ( "developer-build" "QT_BUILD_INTERNAL" )
qt_feature_config ( "developer-build" QMAKE_PUBLIC_QT_CONFIG
N A M E " p r i v a t e _ t e s t s "
)
2020-02-26 11:53:30 +00:00
qt_feature ( "debug"
L A B E L " B u i l d f o r d e b u g g i n g "
2020-08-21 13:16:31 +00:00
A U T O D E T E C T O N
2020-03-06 08:28:12 +00:00
C O N D I T I O N C M A K E _ B U I L D _ T Y P E S T R E Q U A L D e b u g O R D e b u g I N _ L I S T C M A K E _ C O N F I G U R A T I O N _ T Y P E S
2020-02-26 11:53:30 +00:00
)
2020-02-26 12:23:05 +00:00
qt_feature ( "debug_and_release" PUBLIC
L A B E L " C o m p i l e l i b s i n d e b u g a n d r e l e a s e m o d e "
A U T O D E T E C T 1
C O N D I T I O N Q T _ G E N E R A T O R _ I S _ M U L T I _ C O N F I G
)
qt_feature_config ( "debug_and_release" QMAKE_PUBLIC_QT_CONFIG )
2020-02-26 12:38:23 +00:00
qt_feature ( "force_debug_info"
L A B E L " A d d d e b u g i n f o i n r e l e a s e m o d e "
A U T O D E T E C T C M A K E _ B U I L D _ T Y P E S T R E Q U A L R e l W i t h D e b I n f o O R R e l W i t h D e b I n f o I N _ L I S T C M A K E _ C O N F I G U R A T I O N _ T Y P E S
)
qt_feature_config ( "force_debug_info" QMAKE_PRIVATE_CONFIG )
2020-02-26 10:41:20 +00:00
qt_feature ( "separate_debug_info" PUBLIC
L A B E L " S p l i t o f f d e b u g i n f o r m a t i o n "
A U T O D E T E C T O F F
CONDITION ( QT_FEATURE_shared ) AND ( QT_FEATURE_debug OR QT_FEATURE_debug_and_release OR QT_FEATURE_force_debug_info ) AND ( APPLE OR TEST_separate_debug_info )
)
qt_feature_config ( "separate_debug_info" QMAKE_PUBLIC_QT_CONFIG )
2019-11-29 18:45:38 +00:00
qt_feature ( "appstore-compliant" PUBLIC
2018-10-24 13:20:27 +00:00
L A B E L " A p p s t o r e c o m p l i a n c e "
P U R P O S E " D i s a b l e s c o d e t h a t i s n o t a l l o w e d i n p l a t f o r m a p p s t o r e s "
2020-06-05 07:24:37 +00:00
A U T O D E T E C T U I K I T O R A N D R O I D
2018-10-24 13:20:27 +00:00
)
qt_feature ( "simulator_and_device" PUBLIC
L A B E L " B u i l d f o r b o t h s i m u l a t o r a n d d e v i c e "
2020-03-16 12:36:47 +00:00
C O N D I T I O N U I K I T A N D N O T Q T _ U I K I T _ S D K
2018-10-24 13:20:27 +00:00
)
2019-11-29 18:45:38 +00:00
qt_feature_config ( "simulator_and_device" QMAKE_PUBLIC_QT_CONFIG )
2020-03-31 07:39:50 +00:00
qt_feature ( "rpath" PUBLIC
L A B E L " B u i l d w i t h R P A T H "
A U T O D E T E C T 1
CMake: Handle automatic rpath embedding correctly
Instead of using CMAKE_INSTALL_RPATH to embed an absolute path
to prefix/libdir into all targets, use the more sophisticated aproach
that qmake does.
For certain targets (modules, plugins, tools) use relative rpaths.
Otherwise embed absolute paths (examples, regular binaries).
Installed tests currently have no rpaths.
On certain platforms rpaths are not used (Windows, Android,
iOS / uikit).
Frameworks, app bundles and shallow bundles should also be handled
correctly.
Additional rpaths can be provided via QT_EXTRA_RPATHS variable
(similar to the -R option that configure takes).
Automatic embedding can be disabled either via QT_FEATURE_rpath=OFF
or QT_DISABLE_RPATH=ON.
Note that installed examples are not relocatable at the moment (due
to always having an absolute path rpath), so this is a missing feature
compared to qmake. This is due to missing information on where
examples will be installed, so a relative rpath can not be computed.
By default a Qt installation is relocatable, so there is no need to
pass -DQT_EXTRA_RPATHS=. like Coin used to do with qmake e.g. -R .
Relative rpaths will have the appropriate 'relative base' prefixed
to them (e.g $ORIGIN on linux and @loader_path on darwin platforms).
There is currently no support for other platforms that might have a
different 'relative base' than the ones mentioned above.
Any extra rpaths are saved to BuildInternalsExtra which are re-used
when building other repositories.
configurejson2cmake modified to include correct conditions for the
rpath feature.
It's very likely that we will need a new qt_add_internal_app()
function for gui apps that are to be installed to prefix/bin.
For example for Assistant from qttools. Currently such apps
use qt_add_executable().
The distinction is necessary to make sure that relative rpaths are
embedded into apps, but not executables (which tests are part of).
Amends e835a6853b9c0fb7af32798ed8965de3adf0e15b
Task-number: QTBUG-83497
Change-Id: I3510f63c0a59489741116cc8ec3ef6a0a7704f25
Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>
2020-04-15 16:48:26 +00:00
C O N D I T I O N B U I L D _ S H A R E D _ L I B S A N D UNIX A N D N O T WIN32 A N D N O T A N D R O I D
2020-03-31 07:39:50 +00:00
)
qt_feature_config ( "rpath" QMAKE_PUBLIC_QT_CONFIG )
2018-10-24 13:20:27 +00:00
qt_feature ( "force_asserts" PUBLIC
L A B E L " F o r c e a s s e r t i o n s "
A U T O D E T E C T O F F
)
2019-11-29 18:45:38 +00:00
qt_feature ( "headersclean"
L A B E L " C h e c k f o r c l e a n h e a d e r s "
2020-05-13 13:35:52 +00:00
A U T O D E T E C T O F F
2019-11-29 18:45:38 +00:00
C O N D I T I O N N O T W A S M
)
qt_feature_config ( "headersclean" QMAKE_PRIVATE_CONFIG )
2018-10-24 13:20:27 +00:00
qt_feature ( "framework" PUBLIC
L A B E L " B u i l d A p p l e F r a m e w o r k s "
2020-03-09 12:37:41 +00:00
C O N D I T I O N APPLE A N D B U I L D _ S H A R E D _ L I B S A N D N O T C M A K E _ B U I L D _ T Y P E S T R E Q U A L D e b u g
2018-10-24 13:20:27 +00:00
)
qt_feature_definition ( "framework" "QT_MAC_FRAMEWORK_BUILD" )
2019-11-29 18:45:38 +00:00
qt_feature_config ( "framework" QMAKE_PUBLIC_QT_CONFIG
N A M E " q t _ f r a m e w o r k "
)
qt_feature_config ( "framework" QMAKE_PUBLIC_CONFIG
N A M E " q t _ f r a m e w o r k "
)
2019-03-14 12:22:09 +00:00
qt_feature ( "largefile"
2018-10-24 13:20:27 +00:00
L A B E L " L a r g e f i l e s u p p o r t "
2020-06-05 07:24:37 +00:00
C O N D I T I O N N O T A N D R O I D A N D N O T I N T E G R I T Y A N D N O T r t e m s
2018-10-24 13:20:27 +00:00
)
qt_feature_definition ( "largefile" "QT_LARGEFILE_SUPPORT" VALUE "64" )
2019-11-29 18:45:38 +00:00
qt_feature_config ( "largefile" QMAKE_PRIVATE_CONFIG )
qt_feature ( "testcocoon"
L A B E L " T e s t c o c o o n s u p p o r t "
A U T O D E T E C T O F F
)
qt_feature_config ( "testcocoon" QMAKE_PUBLIC_CONFIG )
2020-06-15 07:50:42 +00:00
qt_feature ( "sanitize_address"
L A B E L " A d d r e s s e s "
A U T O D E T E C T O F F
)
qt_feature_config ( "sanitize_address" QMAKE_PUBLIC_CONFIG )
qt_feature ( "sanitize_thread"
L A B E L " T h r e a d s "
A U T O D E T E C T O F F
)
qt_feature_config ( "sanitize_thread" QMAKE_PUBLIC_CONFIG )
qt_feature ( "sanitize_memory"
L A B E L " M e m o r y "
A U T O D E T E C T O F F
)
qt_feature_config ( "sanitize_memory" QMAKE_PUBLIC_CONFIG )
2020-01-16 09:42:05 +00:00
qt_feature ( "sanitize_fuzzer_no_link"
L A B E L " Fuzzer ( instrumentation only ) "
P U R P O S E " A d d s i n s t r u m e n t a t i o n f o r f u z z i n g t o t h e b i n a r i e s b u t l i n k s t o t h e u s u a l m a i n f u n c t i o n i n s t e a d o f a f u z z e r ' s . "
A U T O D E T E C T O F F
)
qt_feature_config ( "sanitize_fuzzer_no_link" QMAKE_PUBLIC_CONFIG )
2020-06-15 07:50:42 +00:00
qt_feature ( "sanitize_undefined"
L A B E L " U n d e f i n e d "
A U T O D E T E C T O F F
)
qt_feature_config ( "sanitize_undefined" QMAKE_PUBLIC_CONFIG )
qt_feature ( "sanitizer"
L A B E L " S a n i t i z e r s "
C O N D I T I O N Q T _ F E A T U R E _ s a n i t i z e _ a d d r e s s O R Q T _ F E A T U R E _ s a n i t i z e _ t h r e a d O R Q T _ F E A T U R E _ s a n i t i z e _ m e m o r y O R Q T _ F E A T U R E _ s a n i t i z e _ f u z z e r _ n o _ l i n k O R Q T _ F E A T U R E _ s a n i t i z e _ u n d e f i n e d
)
qt_feature_config ( "sanitizer" QMAKE_PUBLIC_CONFIG )
2019-11-29 18:45:38 +00:00
qt_feature ( "coverage_trace_pc_guard"
L A B E L " t r a c e - p c - g u a r d "
A U T O D E T E C T O F F
)
qt_feature_config ( "coverage_trace_pc_guard" QMAKE_PUBLIC_CONFIG )
2020-02-13 08:14:09 +00:00
qt_feature ( "coverage_source_based"
L A B E L " s o u r c e - b a s e d "
A U T O D E T E C T O F F
)
qt_feature_config ( "coverage_source_based" QMAKE_PUBLIC_CONFIG )
2019-11-29 18:45:38 +00:00
qt_feature ( "coverage"
L A B E L " C o d e C o v e r a g e I n s t r u m e n t a t i o n "
2020-02-13 08:14:09 +00:00
C O N D I T I O N Q T _ F E A T U R E _ c o v e r a g e _ t r a c e _ p c _ g u a r d O R Q T _ F E A T U R E _ c o v e r a g e _ s o u r c e _ b a s e d
2019-11-29 18:45:38 +00:00
)
qt_feature_config ( "coverage" QMAKE_PUBLIC_CONFIG )
qt_feature ( "plugin-manifests"
L A B E L " E m b e d m a n i f e s t s i n p l u g i n s "
A U T O D E T E C T O F F
E M I T _ I F WIN32
)
qt_feature_config ( "plugin-manifests" QMAKE_PUBLIC_CONFIG
N E G A T E
N A M E " n o _ p l u g i n _ m a n i f e s t "
)
qt_feature ( "c++11" PUBLIC
2019-05-28 14:19:42 +00:00
L A B E L " C + + 1 1 "
)
2019-11-29 18:45:38 +00:00
qt_feature_config ( "c++11" QMAKE_PUBLIC_QT_CONFIG )
qt_feature ( "c++14" PUBLIC
2019-05-28 14:19:42 +00:00
L A B E L " C + + 1 4 "
2019-10-17 08:49:44 +00:00
C O N D I T I O N Q T _ F E A T U R E _ c x x 1 1 A N D T E S T _ c x x 1 4
2019-05-28 14:19:42 +00:00
)
2019-11-29 18:45:38 +00:00
qt_feature_config ( "c++14" QMAKE_PUBLIC_QT_CONFIG )
qt_feature ( "c++17" PUBLIC
2019-05-28 14:19:42 +00:00
L A B E L " C + + 1 7 "
2019-10-17 08:49:44 +00:00
C O N D I T I O N Q T _ F E A T U R E _ c x x 1 4 A N D T E S T _ c x x 1 7
2019-05-28 14:19:42 +00:00
)
2019-11-29 18:45:38 +00:00
qt_feature_config ( "c++17" QMAKE_PUBLIC_QT_CONFIG )
qt_feature ( "c++1z" PUBLIC
2019-10-11 14:55:55 +00:00
L A B E L " C + + 1 7 "
C O N D I T I O N Q T _ F E A T U R E _ c x x 1 7
)
2019-11-29 18:45:38 +00:00
qt_feature_config ( "c++1z" QMAKE_PUBLIC_QT_CONFIG )
2021-02-09 12:12:09 +00:00
qt_feature ( "c++20" PUBLIC
L A B E L " C + + 2 0 "
2019-05-28 14:19:42 +00:00
A U T O D E T E C T O F F
2021-02-09 12:12:09 +00:00
C O N D I T I O N Q T _ F E A T U R E _ c x x 1 7 A N D T E S T _ c x x 2 0
)
qt_feature_config ( "c++20" QMAKE_PUBLIC_QT_CONFIG )
qt_feature ( "c++2a" PUBLIC
L A B E L " C + + 2 0 "
C O N D I T I O N Q T _ F E A T U R E _ c x x 2 0
2019-05-28 14:19:42 +00:00
)
2019-11-29 18:45:38 +00:00
qt_feature_config ( "c++2a" QMAKE_PUBLIC_QT_CONFIG )
2020-03-06 12:34:59 +00:00
qt_feature ( "c89"
L A B E L " C 8 9 "
)
qt_feature ( "c99" PUBLIC
L A B E L " C 9 9 "
C O N D I T I O N c _ s t d _ 9 9 I N _ L I S T C M A K E _ C _ C O M P I L E _ F E A T U R E S
)
qt_feature ( "c11" PUBLIC
L A B E L " C 1 1 "
C O N D I T I O N Q T _ F E A T U R E _ c 9 9 A N D c _ s t d _ 1 1 I N _ L I S T C M A K E _ C _ C O M P I L E _ F E A T U R E S
)
2020-04-03 14:33:24 +00:00
qt_feature ( "precompile_header"
L A B E L " U s i n g p r e c o m p i l e d h e a d e r s "
C O N D I T I O N B U I L D _ W I T H _ P C H
2020-09-03 08:29:41 +00:00
A U T O D E T E C T N O T W A S M
2020-04-03 14:33:24 +00:00
)
qt_feature_config ( "precompile_header" QMAKE_PRIVATE_CONFIG )
2020-08-27 12:11:00 +00:00
set ( __qt_ltcg_detected FALSE )
if ( CMAKE_INTERPROCEDURAL_OPTIMIZATION )
set ( __qt_ltcg_detected TRUE )
else ( )
foreach ( config ${ CMAKE_BUILD_TYPE } ${ CMAKE_CONFIGURATION_TYPES } )
2020-11-05 10:14:17 +00:00
string ( TOUPPER "${config}" __qt_uc_config )
if ( CMAKE_INTERPROCEDURAL_OPTIMIZATION_ ${ __qt_uc_config } )
2020-08-27 12:11:00 +00:00
set ( __qt_ltcg_detected TRUE )
break ( )
endif ( )
endforeach ( )
2020-11-05 10:14:17 +00:00
unset ( __qt_uc_config )
2020-08-27 12:11:00 +00:00
endif ( )
2020-04-17 06:39:47 +00:00
qt_feature ( "ltcg"
L A B E L " U s i n g L T C G "
2020-08-27 12:11:00 +00:00
A U T O D E T E C T O N
C O N D I T I O N _ _ q t _ l t c g _ d e t e c t e d
2020-04-17 06:39:47 +00:00
)
qt_feature_config ( "ltcg" QMAKE_PRIVATE_CONFIG )
2020-12-21 18:29:30 +00:00
qt_feature ( "enable_new_dtags"
L A B E L " U s i n g n e w D T A G S "
C O N D I T I O N L I N U X A N D T E S T _ e n a b l e _ n e w _ d t a g s
)
qt_feature_config ( "enable_new_dtags" QMAKE_PRIVATE_CONFIG )
2020-08-21 07:22:23 +00:00
qt_feature ( "enable_gdb_index"
L A B E L " G e n e r a t i n g G D B i n d e x "
A U T O D E T E C T Q T _ F E A T U R E _ d e v e l o p e r _ b u i l d
C O N D I T I O N G C C A N D N O T C L A N G AND ( QT_FEATURE_debug OR QT_FEATURE_force_debug_info OR QT_FEATURE_debug_and_release ) A N D T E S T _ g d b _ i n d e x
)
qt_feature_config ( "enable_gdb_index" QMAKE_PRIVATE_CONFIG )
2019-03-14 12:22:09 +00:00
qt_feature ( "reduce_exports" PRIVATE
2018-10-24 13:20:27 +00:00
L A B E L " R e d u c e a m o u n t o f e x p o r t e d s y m b o l s "
2020-08-25 06:17:23 +00:00
C O N D I T I O N N O T MSVC
2018-10-24 13:20:27 +00:00
)
qt_feature_definition ( "reduce_exports" "QT_VISIBILITY_AVAILABLE" )
2019-11-29 18:45:38 +00:00
qt_feature_config ( "reduce_exports" QMAKE_PUBLIC_QT_CONFIG )
2020-02-17 13:58:16 +00:00
qt_feature ( "reduce_relocations" PRIVATE
L A B E L " R e d u c e a m o u n t o f r e l o c a t i o n s "
C O N D I T I O N N O T WIN32 A N D T E S T _ r e d u c e _ r e l o c a t i o n s
)
qt_feature_definition ( "reduce_relocations" "QT_REDUCE_RELOCATIONS" )
qt_feature_config ( "reduce_relocations" QMAKE_PUBLIC_QT_CONFIG )
2019-10-11 14:55:55 +00:00
qt_feature ( "signaling_nan" PUBLIC
L A B E L " S i g n a l i n g N a N "
C O N D I T I O N T E S T _ s i g n a l i n g _ n a n
)
2019-03-14 12:22:09 +00:00
qt_feature ( "sse2" PRIVATE
2018-10-24 13:20:27 +00:00
L A B E L " S S E 2 "
CMake: Fix building multi-arch universal macOS Qt
Use the same approach we use for iOS, which is to set multiple
CMAKE_OSX_ARCHITECTURES values and let the clang front end
deal with lipo-ing the final libraries.
For now, Qt can be configured to build universal macOS libraries by
passing 2 architectures to CMake, either via:
-DCMAKE_OSX_ARCHITECTURES="x86_64;arm64"
or
-DCMAKE_OSX_ARCHITECTURES="arm64;x86_64"
Currently we recommend specifying the intel x86_64 arch as the first
one, to get an intel slice configuration that is comparable to a
non-universal intel build.
Specifying the arm64 slice first could pessimize optimizations and
reduce the feature set for the intel slice due to the limitation
that we run configure tests only once.
The first specified architecture is the one used to do all the
configure tests.
It 'mostly' defines the common feature set of both architecture
slices, with the excepion of some special handling for sse2 and
neon instructions.
In the future we might want to run at least the Qt architecture config
test for all specified architectures, so that we can extract all the
supported sub-arches and instruction sets in a reliable way.
For now, we use the same sse2 hack as for iOS simulator_and_device
builds, otherwise QtGui fails to link due to missing
qt_memfill32_sse2 and other symbols.
The hack is somewhat augmented to ensure that reconfiguration
still succeeds (same issue happened with iOS). Previously the sse2
feature condition was broken due to force setting the feature
to be ON. Now the condition also checks for a special
QT_FORCE_FEATURE_sse2 variable which we set internally.
Note that we shouldn't build for arm64e, because the binaries
get killed when running on AS with the following message:
kernel: exec_mach_imgact: not running binary built against
preview arm64e ABI.
Aslo, by default, we disable the arm64 slice for qt sql plugins,
mostly because the CI provisioned sql libraries that we depend on only
contain x86_64 slices, and trying to build the sql plugins for both
slices will fail with linker errors.
This behavior can be disabled for all targets marked by
qt_internal_force_macos_intel_arch, by setting the
QT_FORCE_MACOS_ALL_ARCHES CMake option to ON.
To disble it per-target one can set
QT_FORCE_MACOS_ALL_ARCHES_${target} to ON.
Task-number: QTBUG-85447
Change-Id: Iccb5dfcc1a21a8a8292bd3817df0ea46c3445f75
Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
2021-03-24 15:03:35 +00:00
CONDITION ( ( ( TEST_architecture_arch STREQUAL i386 ) OR ( TEST_architecture_arch STREQUAL x86_64 ) ) AND TEST_subarch_sse2 ) O R Q T _ F O R C E _ F E A T U R E _ s s e 2 # special case
2018-10-24 13:20:27 +00:00
)
qt_feature_definition ( "sse2" "QT_COMPILER_SUPPORTS_SSE2" VALUE "1" )
2019-11-29 18:45:38 +00:00
qt_feature_config ( "sse2" QMAKE_PRIVATE_CONFIG )
2021-03-31 16:56:59 +00:00
qt_feature ( "sse3" PRIVATE
2018-10-24 13:20:27 +00:00
L A B E L " S S E 3 "
C O N D I T I O N Q T _ F E A T U R E _ s s e 2 A N D T E S T _ s u b a r c h _ s s e 3
)
qt_feature_definition ( "sse3" "QT_COMPILER_SUPPORTS_SSE3" VALUE "1" )
2019-11-29 18:45:38 +00:00
qt_feature_config ( "sse3" QMAKE_PRIVATE_CONFIG )
2021-03-31 16:56:59 +00:00
qt_feature ( "ssse3" PRIVATE
2018-10-24 13:20:27 +00:00
L A B E L " S S S E 3 "
C O N D I T I O N Q T _ F E A T U R E _ s s e 3 A N D T E S T _ s u b a r c h _ s s s e 3
)
qt_feature_definition ( "ssse3" "QT_COMPILER_SUPPORTS_SSSE3" VALUE "1" )
2019-11-29 18:45:38 +00:00
qt_feature_config ( "ssse3" QMAKE_PRIVATE_CONFIG )
2021-03-31 16:56:59 +00:00
qt_feature ( "sse4_1" PRIVATE
2018-10-24 13:20:27 +00:00
L A B E L " S S E 4 . 1 "
C O N D I T I O N Q T _ F E A T U R E _ s s s e 3 A N D T E S T _ s u b a r c h _ s s e 4 _ 1
)
qt_feature_definition ( "sse4_1" "QT_COMPILER_SUPPORTS_SSE4_1" VALUE "1" )
2019-11-29 18:45:38 +00:00
qt_feature_config ( "sse4_1" QMAKE_PRIVATE_CONFIG )
2021-03-31 16:56:59 +00:00
qt_feature ( "sse4_2" PRIVATE
2018-10-24 13:20:27 +00:00
L A B E L " S S E 4 . 2 "
C O N D I T I O N Q T _ F E A T U R E _ s s e 4 _ 1 A N D T E S T _ s u b a r c h _ s s e 4 _ 2
)
qt_feature_definition ( "sse4_2" "QT_COMPILER_SUPPORTS_SSE4_2" VALUE "1" )
2019-11-29 18:45:38 +00:00
qt_feature_config ( "sse4_2" QMAKE_PRIVATE_CONFIG )
2021-03-31 16:56:59 +00:00
qt_feature ( "avx" PRIVATE
2018-10-24 13:20:27 +00:00
L A B E L " A V X "
2020-09-14 15:56:32 +00:00
C O N D I T I O N Q T _ F E A T U R E _ s s e 4 _ 2 A N D T E S T _ s u b a r c h _ a v x AND ( NOT ANDROID OR NOT ( TEST_architecture_arch STREQUAL x86_64 ) )
2018-10-24 13:20:27 +00:00
)
qt_feature_definition ( "avx" "QT_COMPILER_SUPPORTS_AVX" VALUE "1" )
2019-11-29 18:45:38 +00:00
qt_feature_config ( "avx" QMAKE_PRIVATE_CONFIG )
2021-03-31 16:56:59 +00:00
qt_feature ( "f16c" PRIVATE
2018-10-24 13:20:27 +00:00
L A B E L " F 1 6 C "
2019-03-14 12:22:09 +00:00
C O N D I T I O N Q T _ F E A T U R E _ a v x A N D T E S T _ s u b a r c h _ f 1 6 c
2018-10-24 13:20:27 +00:00
)
qt_feature_definition ( "f16c" "QT_COMPILER_SUPPORTS_F16C" VALUE "1" )
2019-11-29 18:45:38 +00:00
qt_feature_config ( "f16c" QMAKE_PRIVATE_CONFIG )
2019-03-14 12:22:09 +00:00
qt_feature ( "avx2" PRIVATE
2018-10-24 13:20:27 +00:00
L A B E L " A V X 2 "
2020-09-14 15:56:32 +00:00
C O N D I T I O N Q T _ F E A T U R E _ a v x A N D T E S T _ s u b a r c h _ a v x 2 AND ( NOT ANDROID OR NOT ( TEST_architecture_arch STREQUAL x86_64 ) )
2018-10-24 13:20:27 +00:00
)
qt_feature_definition ( "avx2" "QT_COMPILER_SUPPORTS_AVX2" VALUE "1" )
2019-11-29 18:45:38 +00:00
qt_feature_config ( "avx2" QMAKE_PRIVATE_CONFIG )
2021-03-31 16:56:59 +00:00
qt_feature ( "avx512f" PRIVATE
2018-10-24 13:20:27 +00:00
L A B E L " F "
C O N D I T I O N Q T _ F E A T U R E _ a v x 2 A N D T E S T _ s u b a r c h _ a v x 5 1 2 f
)
qt_feature_definition ( "avx512f" "QT_COMPILER_SUPPORTS_AVX512F" VALUE "1" )
2019-11-29 18:45:38 +00:00
qt_feature_config ( "avx512f" QMAKE_PRIVATE_CONFIG )
2021-03-31 16:56:59 +00:00
qt_feature ( "avx512er" PRIVATE
2018-10-24 13:20:27 +00:00
L A B E L " E R "
C O N D I T I O N Q T _ F E A T U R E _ a v x 5 1 2 f A N D T E S T _ s u b a r c h _ a v x 5 1 2 e r
)
qt_feature_definition ( "avx512er" "QT_COMPILER_SUPPORTS_AVX512ER" VALUE "1" )
2019-11-29 18:45:38 +00:00
qt_feature_config ( "avx512er" QMAKE_PRIVATE_CONFIG )
2021-03-31 16:56:59 +00:00
qt_feature ( "avx512cd" PRIVATE
2018-10-24 13:20:27 +00:00
L A B E L " C D "
C O N D I T I O N Q T _ F E A T U R E _ a v x 5 1 2 f A N D T E S T _ s u b a r c h _ a v x 5 1 2 c d
)
qt_feature_definition ( "avx512cd" "QT_COMPILER_SUPPORTS_AVX512CD" VALUE "1" )
2019-11-29 18:45:38 +00:00
qt_feature_config ( "avx512cd" QMAKE_PRIVATE_CONFIG )
2021-03-31 16:56:59 +00:00
qt_feature ( "avx512pf" PRIVATE
2018-10-24 13:20:27 +00:00
L A B E L " P F "
C O N D I T I O N Q T _ F E A T U R E _ a v x 5 1 2 f A N D T E S T _ s u b a r c h _ a v x 5 1 2 p f
)
qt_feature_definition ( "avx512pf" "QT_COMPILER_SUPPORTS_AVX512PF" VALUE "1" )
2019-11-29 18:45:38 +00:00
qt_feature_config ( "avx512pf" QMAKE_PRIVATE_CONFIG )
2021-03-31 16:56:59 +00:00
qt_feature ( "avx512dq" PRIVATE
2018-10-24 13:20:27 +00:00
L A B E L " D Q "
C O N D I T I O N Q T _ F E A T U R E _ a v x 5 1 2 f A N D T E S T _ s u b a r c h _ a v x 5 1 2 d q
)
qt_feature_definition ( "avx512dq" "QT_COMPILER_SUPPORTS_AVX512DQ" VALUE "1" )
2019-11-29 18:45:38 +00:00
qt_feature_config ( "avx512dq" QMAKE_PRIVATE_CONFIG )
2021-03-31 16:56:59 +00:00
qt_feature ( "avx512bw" PRIVATE
2018-10-24 13:20:27 +00:00
L A B E L " B W "
C O N D I T I O N Q T _ F E A T U R E _ a v x 5 1 2 f A N D T E S T _ s u b a r c h _ a v x 5 1 2 b w
)
qt_feature_definition ( "avx512bw" "QT_COMPILER_SUPPORTS_AVX512BW" VALUE "1" )
2019-11-29 18:45:38 +00:00
qt_feature_config ( "avx512bw" QMAKE_PRIVATE_CONFIG )
2021-03-31 16:56:59 +00:00
qt_feature ( "avx512vl" PRIVATE
2018-10-24 13:20:27 +00:00
L A B E L " V L "
C O N D I T I O N Q T _ F E A T U R E _ a v x 5 1 2 f A N D T E S T _ s u b a r c h _ a v x 5 1 2 v l
)
qt_feature_definition ( "avx512vl" "QT_COMPILER_SUPPORTS_AVX512VL" VALUE "1" )
2019-11-29 18:45:38 +00:00
qt_feature_config ( "avx512vl" QMAKE_PRIVATE_CONFIG )
2021-03-31 16:56:59 +00:00
qt_feature ( "avx512ifma" PRIVATE
2018-10-24 13:20:27 +00:00
L A B E L " I F M A "
C O N D I T I O N Q T _ F E A T U R E _ a v x 5 1 2 f A N D T E S T _ s u b a r c h _ a v x 5 1 2 i f m a
)
qt_feature_definition ( "avx512ifma" "QT_COMPILER_SUPPORTS_AVX512IFMA" VALUE "1" )
2019-11-29 18:45:38 +00:00
qt_feature_config ( "avx512ifma" QMAKE_PRIVATE_CONFIG )
2021-03-31 16:56:59 +00:00
qt_feature ( "avx512vbmi" PRIVATE
2018-10-24 13:20:27 +00:00
L A B E L " V B M I "
C O N D I T I O N Q T _ F E A T U R E _ a v x 5 1 2 f A N D T E S T _ s u b a r c h _ a v x 5 1 2 v b m i
)
qt_feature_definition ( "avx512vbmi" "QT_COMPILER_SUPPORTS_AVX512VBMI" VALUE "1" )
2019-11-29 18:45:38 +00:00
qt_feature_config ( "avx512vbmi" QMAKE_PRIVATE_CONFIG )
2021-03-31 16:56:59 +00:00
qt_feature ( "aesni" PRIVATE
2018-10-24 13:20:27 +00:00
L A B E L " A E S "
2020-11-30 15:54:17 +00:00
C O N D I T I O N Q T _ F E A T U R E _ s s e 2 A N D T E S T _ s u b a r c h _ a e s n i
2018-10-24 13:20:27 +00:00
)
qt_feature_definition ( "aesni" "QT_COMPILER_SUPPORTS_AES" VALUE "1" )
2019-11-29 18:45:38 +00:00
qt_feature_config ( "aesni" QMAKE_PRIVATE_CONFIG )
2021-03-31 16:56:59 +00:00
qt_feature ( "rdrnd" PRIVATE
2018-10-24 13:20:27 +00:00
L A B E L " R D R A N D "
2020-11-30 15:54:17 +00:00
C O N D I T I O N T E S T _ s u b a r c h _ r d r n d
2018-10-24 13:20:27 +00:00
)
qt_feature_definition ( "rdrnd" "QT_COMPILER_SUPPORTS_RDRND" VALUE "1" )
2019-11-29 18:45:38 +00:00
qt_feature_config ( "rdrnd" QMAKE_PRIVATE_CONFIG )
2021-03-31 16:56:59 +00:00
qt_feature ( "rdseed" PRIVATE
2019-10-11 14:55:55 +00:00
L A B E L " R D S E E D "
C O N D I T I O N T E S T _ s u b a r c h _ r d s e e d
)
qt_feature_definition ( "rdseed" "QT_COMPILER_SUPPORTS_RDSEED" VALUE "1" )
2019-11-29 18:45:38 +00:00
qt_feature_config ( "rdseed" QMAKE_PRIVATE_CONFIG )
2021-03-31 16:56:59 +00:00
qt_feature ( "shani" PRIVATE
2018-10-24 13:20:27 +00:00
L A B E L " S H A "
2020-11-30 15:54:17 +00:00
C O N D I T I O N Q T _ F E A T U R E _ s s e 2 A N D T E S T _ s u b a r c h _ s h a n i
2018-10-24 13:20:27 +00:00
)
qt_feature_definition ( "shani" "QT_COMPILER_SUPPORTS_SHA" VALUE "1" )
2019-11-29 18:45:38 +00:00
qt_feature_config ( "shani" QMAKE_PRIVATE_CONFIG )
2019-03-14 12:22:09 +00:00
qt_feature ( "x86SimdAlways"
2018-10-24 13:20:27 +00:00
L A B E L " I n t r i n s i c s w i t h o u t - m X X X o p t i o n "
CONDITION ( ( TEST_architecture_arch STREQUAL i386 ) OR ( TEST_architecture_arch STREQUAL x86_64 ) ) A N D O N
)
qt_feature_definition ( "x86SimdAlways" "QT_COMPILER_SUPPORTS_SIMD_ALWAYS" VALUE "1" )
2019-11-29 18:45:38 +00:00
qt_feature_config ( "x86SimdAlways" QMAKE_PRIVATE_CONFIG )
2021-03-31 16:56:59 +00:00
qt_feature ( "mips_dsp" PRIVATE
2018-10-24 13:20:27 +00:00
L A B E L " D S P "
2019-03-21 12:14:09 +00:00
CONDITION ( TEST_architecture_arch STREQUAL mips ) A N D T E S T _ a r c h _ $ { T E S T _ a r c h i t e c t u r e _ a r c h } _ s u b a r c h _ d s p
2018-10-24 13:20:27 +00:00
)
qt_feature_definition ( "mips_dsp" "QT_COMPILER_SUPPORTS_MIPS_DSP" VALUE "1" )
2019-11-29 18:45:38 +00:00
qt_feature_config ( "mips_dsp" QMAKE_PRIVATE_CONFIG )
2021-03-31 16:56:59 +00:00
qt_feature ( "mips_dspr2" PRIVATE
2018-10-24 13:20:27 +00:00
L A B E L " D S P r 2 "
2019-03-21 12:14:09 +00:00
CONDITION ( TEST_architecture_arch STREQUAL mips ) A N D T E S T _ a r c h _ $ { T E S T _ a r c h i t e c t u r e _ a r c h } _ s u b a r c h _ d s p r 2
2018-10-24 13:20:27 +00:00
)
qt_feature_definition ( "mips_dspr2" "QT_COMPILER_SUPPORTS_MIPS_DSPR2" VALUE "1" )
2019-11-29 18:45:38 +00:00
qt_feature_config ( "mips_dspr2" QMAKE_PRIVATE_CONFIG )
2021-03-31 16:56:59 +00:00
qt_feature ( "neon" PRIVATE
2018-10-24 13:20:27 +00:00
L A B E L " N E O N "
CMake: Fix building multi-arch universal macOS Qt
Use the same approach we use for iOS, which is to set multiple
CMAKE_OSX_ARCHITECTURES values and let the clang front end
deal with lipo-ing the final libraries.
For now, Qt can be configured to build universal macOS libraries by
passing 2 architectures to CMake, either via:
-DCMAKE_OSX_ARCHITECTURES="x86_64;arm64"
or
-DCMAKE_OSX_ARCHITECTURES="arm64;x86_64"
Currently we recommend specifying the intel x86_64 arch as the first
one, to get an intel slice configuration that is comparable to a
non-universal intel build.
Specifying the arm64 slice first could pessimize optimizations and
reduce the feature set for the intel slice due to the limitation
that we run configure tests only once.
The first specified architecture is the one used to do all the
configure tests.
It 'mostly' defines the common feature set of both architecture
slices, with the excepion of some special handling for sse2 and
neon instructions.
In the future we might want to run at least the Qt architecture config
test for all specified architectures, so that we can extract all the
supported sub-arches and instruction sets in a reliable way.
For now, we use the same sse2 hack as for iOS simulator_and_device
builds, otherwise QtGui fails to link due to missing
qt_memfill32_sse2 and other symbols.
The hack is somewhat augmented to ensure that reconfiguration
still succeeds (same issue happened with iOS). Previously the sse2
feature condition was broken due to force setting the feature
to be ON. Now the condition also checks for a special
QT_FORCE_FEATURE_sse2 variable which we set internally.
Note that we shouldn't build for arm64e, because the binaries
get killed when running on AS with the following message:
kernel: exec_mach_imgact: not running binary built against
preview arm64e ABI.
Aslo, by default, we disable the arm64 slice for qt sql plugins,
mostly because the CI provisioned sql libraries that we depend on only
contain x86_64 slices, and trying to build the sql plugins for both
slices will fail with linker errors.
This behavior can be disabled for all targets marked by
qt_internal_force_macos_intel_arch, by setting the
QT_FORCE_MACOS_ALL_ARCHES CMake option to ON.
To disble it per-target one can set
QT_FORCE_MACOS_ALL_ARCHES_${target} to ON.
Task-number: QTBUG-85447
Change-Id: Iccb5dfcc1a21a8a8292bd3817df0ea46c3445f75
Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
2021-03-24 15:03:35 +00:00
CONDITION ( ( ( TEST_architecture_arch STREQUAL arm ) OR ( TEST_architecture_arch STREQUAL arm64 ) ) AND TEST_arch_ ${ TEST_architecture_arch } _subarch_neon ) O R Q T _ F O R C E _ F E A T U R E _ n e o n # special case
2018-10-24 13:20:27 +00:00
)
qt_feature_definition ( "neon" "QT_COMPILER_SUPPORTS_NEON" VALUE "1" )
2019-11-29 18:45:38 +00:00
qt_feature_config ( "neon" QMAKE_PRIVATE_CONFIG )
2020-03-24 15:29:54 +00:00
qt_feature ( "posix_fallocate" PRIVATE
L A B E L " P O S I X fallocate ( ) "
C O N D I T I O N T E S T _ p o s i x _ f a l l o c a t e
)
2018-10-24 13:20:27 +00:00
qt_feature ( "alloca_h" PRIVATE
L A B E L " a l l o c a . h "
C O N D I T I O N T E S T _ a l l o c a _ h
)
qt_feature ( "alloca_malloc_h" PRIVATE
L A B E L " alloca ( ) i n m a l l o c . h "
C O N D I T I O N N O T Q T _ F E A T U R E _ a l l o c a _ h A N D T E S T _ a l l o c a _ m a l l o c _ h
)
qt_feature ( "alloca" PRIVATE
L A B E L " alloca ( ) "
C O N D I T I O N Q T _ F E A T U R E _ a l l o c a _ h O R Q T _ F E A T U R E _ a l l o c a _ m a l l o c _ h O R T E S T _ a l l o c a _ s t d l i b _ h
)
2020-02-26 09:39:47 +00:00
qt_feature ( "stack-protector-strong" PRIVATE
L A B E L " s t a c k p r o t e c t i o n "
C O N D I T I O N Q N X A N D T E S T _ s t a c k _ p r o t e c t o r
)
CMake: Allow building bundled 3rd party libraries in qtbase
A few things are needed to accomplish that:
- the python scripts do not ignore certain system_foo features anymore
(it is a hardcoded list for now just to be safe)
- configurejson2cmake now outputs
qt_find_package(WrapSystemFoo) calls for bundled libraries
(see below)
- the harfbuzz .pro file is modified to accommodate pro2cmake
not being able to correctly parse some conditional scopes
- the freetype .pro file is modified to make sure linking of the
library succeeds without duplicate symbol errors, which qmake
doesn't encounter due to magical exclusion of cpp files that are
included in other cpp files (presumably for include moc_foo.cpp
support)
- feature evaluation for Core, Gui, Network now happens in the
qtbase/src directory, so that bundled libraries can be conditionally
built
- for each bundled library there are now two FindWrap scripts:
- FindWrapSystemFoo which finds an installed library in the system
- FindWrapFoo which either uses the system installed library or
the built bundled one depending on a condition
- projects that intend to use bundled libraries need to link against
WrapFoo::WrapFoo instead of WrapSystemFoo::WrapSystemFoo targets
(this is handled by pro2cmake).
Unfortunately manually added qt_find_package(WrapFoo) calls might
still be needed as is the case for WrapFreetype and others.
- a new cmake/QtFindWrapHelper.cmake file is added that provides
a macro to simplify creation of WrapFoo targets that link against
a bundled or system library. The implementation is fairly ugly
due to CMake macro constraints, but it was deemed better than
copy-pasting a bunch of almost identical code across all
FindWrapFoo.cmake files.
- a qtzlib header-only module is now created when using bundled
zlib, to provide public syncqt created headers for consumers
that need them. These are projects that have
'QT_PRIVATE += zlib-private' in their .pro files
(e.g. qtimageformats, qtlocation, qt3d, etc.)
This is unfortunately needed due to QtNetwork using zlib
types in its private C++ API.
The change includes support for building the following bundled
libraries:
- zlib
- libpng
- libjpeg
- Freetype
- Harfbuzz-ng
- PCRE2
The following 3rd party libraries are still using an old
implementation within the CMake build system, and should be migrated
to the new one in the near future:
- double-conversion
- Old harfbuzz
The are a few libraries that are not yet ported:
- system-sqlite
- systemxcb
- maybe others
Among other things, this change allows building qtbase on Windows
without requiring vcpkg.
Task-number: QTBUG-82167
Change-Id: I35ecea0d832f66c1943c82e618de4a51440971a5
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
Reviewed-by: Leander Beernaert <leander.beernaert@qt.io>
2020-02-14 13:53:28 +00:00
qt_feature ( "system-zlib" PRIVATE
L A B E L " U s i n g s y s t e m z l i b "
C O N D I T I O N Z L I B _ F O U N D
)
2019-04-16 14:32:08 +00:00
qt_feature ( "zstd" PRIVATE
L A B E L " Z s t a n d a r d s u p p o r t "
C O N D I T I O N Z S T D _ F O U N D
)
2021-04-15 14:41:02 +00:00
# special case begin
# Check whether CMake was built with zstd support.
# See https://gitlab.kitware.com/cmake/cmake/-/issues/21552
if ( NOT DEFINED CACHE{QT_CMAKE_ZSTD_SUPPORT} )
set ( QT_CMAKE_ZSTD_SUPPORT FALSE CACHE INTERNAL "" )
if ( CMAKE_VERSION VERSION_GREATER_EQUAL "3.18" )
execute_process ( COMMAND "${CMAKE_COMMAND}"
- P " $ { C M A K E _ C U R R E N T _ S O U R C E _ D I R } / c o n f i g . t e s t s / c m a k e _ z s t d / c h e c k _ z s t d . c m a k e "
W O R K I N G _ D I R E C T O R Y " $ { C M A K E _ C U R R E N T _ B I N A R Y _ D I R } / c o n f i g . t e s t s "
O U T P U T _ Q U I E T E R R O R _ Q U I E T
R E S U L T _ V A R I A B L E q t _ c h e c k _ z s t d _ e x i t _ c o d e )
if ( qt_check_zstd_exit_code EQUAL 0 )
set ( QT_CMAKE_ZSTD_SUPPORT TRUE CACHE INTERNAL "" )
endif ( )
unset ( qt_check_zstd_exit_code )
endif ( )
endif ( )
# special case end
2018-10-24 13:20:27 +00:00
qt_feature ( "thread" PUBLIC
S E C T I O N " K e r n e l "
L A B E L " T h r e a d s u p p o r t "
P U R P O S E " P r o v i d e s Q T h r e a d a n d r e l a t e d c l a s s e s . "
2019-04-16 14:32:08 +00:00
A U T O D E T E C T N O T W A S M
2018-10-24 13:20:27 +00:00
)
qt_feature ( "future" PUBLIC
S E C T I O N " K e r n e l "
L A B E L " Q F u t u r e "
P U R P O S E " P r o v i d e s Q F u t u r e a n d r e l a t e d c l a s s e s . "
C O N D I T I O N Q T _ F E A T U R E _ t h r e a d
)
qt_feature ( "concurrent" PUBLIC
S E C T I O N " K e r n e l "
L A B E L " Q t C o n c u r r e n t "
P U R P O S E " P r o v i d e s a h i g h - l e v e l m u l t i - t h r e a d i n g A P I . "
C O N D I T I O N Q T _ F E A T U R E _ f u t u r e
)
qt_feature_definition ( "concurrent" "QT_NO_CONCURRENT" NEGATE VALUE "1" )
qt_feature ( "dbus" PUBLIC PRIVATE
L A B E L " Q t D - B u s "
2020-06-05 07:24:37 +00:00
A U T O D E T E C T N O T U I K I T A N D N O T A N D R O I D
2020-09-03 08:29:41 +00:00
C O N D I T I O N Q T _ F E A T U R E _ t h r e a d A N D N O T W A S M
2018-10-24 13:20:27 +00:00
)
qt_feature_definition ( "dbus" "QT_NO_DBUS" NEGATE VALUE "1" )
2019-11-29 18:45:38 +00:00
qt_feature ( "dbus-linked" PRIVATE
2018-10-24 13:20:27 +00:00
L A B E L " Q t D - B u s d i r e c t l y l i n k e d t o l i b d b u s "
2019-05-03 13:02:32 +00:00
C O N D I T I O N Q T _ F E A T U R E _ d b u s A N D D B u s 1 _ F O U N D
2018-10-24 13:20:27 +00:00
E N A B L E I N P U T _ d b u s S T R E Q U A L ' l i n k e d '
D I S A B L E I N P U T _ d b u s S T R E Q U A L ' r u n t i m e '
)
2020-08-18 08:59:03 +00:00
qt_feature ( "qreal"
L A B E L " T y p e f o r q r e a l "
C O N D I T I O N D E F I N E D Q T _ C O O R D _ T Y P E A N D N O T Q T _ C O O R D _ T Y P E S T R E Q U A L " d o u b l e "
)
qt_feature_definition ( "qreal" "QT_COORD_TYPE" VALUE "${QT_COORD_TYPE}" )
qt_feature_definition ( "qreal" "QT_COORD_TYPE_STRING" VALUE "\" ${ QT_COORD_TYPE } \"")
2018-10-24 13:20:27 +00:00
qt_feature ( "gui" PRIVATE
L A B E L " Q t G u i "
)
2019-11-29 18:45:38 +00:00
qt_feature_config ( "gui" QMAKE_PUBLIC_QT_CONFIG
N E G A T E )
2018-10-24 13:20:27 +00:00
qt_feature ( "network" PRIVATE
L A B E L " Q t N e t w o r k "
)
2021-02-02 10:51:59 +00:00
qt_feature ( "printsupport" PRIVATE
L A B E L " Q t P r i n t S u p p o r t "
C O N D I T I O N Q T _ F E A T U R E _ w i d g e t s
)
2018-10-24 13:20:27 +00:00
qt_feature ( "sql" PRIVATE
L A B E L " Q t S q l "
2020-09-03 08:29:41 +00:00
C O N D I T I O N Q T _ F E A T U R E _ t h r e a d A N D N O T W A S M
2018-10-24 13:20:27 +00:00
)
qt_feature ( "testlib" PRIVATE
L A B E L " Q t T e s t l i b "
)
2019-03-14 12:22:09 +00:00
qt_feature ( "widgets" PRIVATE
2018-10-24 13:20:27 +00:00
L A B E L " Q t W i d g e t s "
2020-03-16 12:36:47 +00:00
A U T O D E T E C T N O T T V O S A N D N O T W A T C H O S
2018-10-24 13:20:27 +00:00
C O N D I T I O N Q T _ F E A T U R E _ g u i
)
qt_feature_definition ( "widgets" "QT_NO_WIDGETS" NEGATE )
2019-11-29 18:45:38 +00:00
qt_feature_config ( "widgets" QMAKE_PUBLIC_QT_CONFIG
N E G A T E )
2018-10-24 13:20:27 +00:00
qt_feature ( "xml" PRIVATE
L A B E L " Q t X m l "
)
qt_feature ( "libudev" PRIVATE
L A B E L " u d e v "
C O N D I T I O N L i b u d e v _ F O U N D
)
2020-04-17 06:56:26 +00:00
qt_feature ( "ccache"
L A B E L " U s i n g c c a c h e "
A U T O D E T E C T 1
C O N D I T I O N Q T _ U S E _ C C A C H E
)
qt_feature_config ( "ccache" QMAKE_PRIVATE_CONFIG )
2020-04-17 15:12:40 +00:00
qt_feature ( "static_runtime"
L A B E L " S t a t i c a l l y l i n k t h e C / C + + r u n t i m e l i b r a r y "
A U T O D E T E C T O F F
C O N D I T I O N N O T Q T _ F E A T U R E _ s h a r e d
E M I T _ I F WIN32
)
qt_feature_config ( "static_runtime" QMAKE_PUBLIC_CONFIG )
qt_feature_config ( "static_runtime" QMAKE_PUBLIC_QT_CONFIG )
2019-10-11 14:55:55 +00:00
qt_feature ( "dlopen" PRIVATE
L A B E L " dlopen ( ) "
C O N D I T I O N UNIX
)
qt_feature ( "relocatable" PRIVATE
L A B E L " R e l o c a t a b l e "
2020-03-01 00:00:23 +00:00
P U R P O S E " E n a b l e t h e Q t i n s t a l l a t i o n t o b e r e l o c a t e d . "
2019-10-11 14:55:55 +00:00
A U T O D E T E C T Q T _ F E A T U R E _ s h a r e d
C O N D I T I O N Q T _ F E A T U R E _ d l o p e n O R WIN32 O R N O T Q T _ F E A T U R E _ s h a r e d
)
2020-05-29 17:01:36 +00:00
qt_feature ( "intelcet" PRIVATE
L A B E L " U s i n g I n t e l C E T "
C O N D I T I O N T E S T _ i n t e l c e t
)
2020-03-02 17:06:46 +00:00
qt_configure_add_summary_build_type_and_config ( )
qt_configure_add_summary_section ( NAME "Build options" )
qt_configure_add_summary_build_mode ( Mode )
qt_configure_add_summary_entry (
A R G S " o p t i m i z e _ d e b u g "
C O N D I T I O N N O T MSVC A N D N O T C L A N G AND ( QT_FEATURE_debug OR QT_FEATURE_debug_and_release )
)
qt_configure_add_summary_entry (
A R G S " o p t i m i z e _ s i z e "
C O N D I T I O N N O T Q T _ F E A T U R E _ d e b u g O R Q T _ F E A T U R E _ d e b u g _ a n d _ r e l e a s e
)
2021-02-12 15:53:07 +00:00
# special case begin
2020-10-05 07:09:13 +00:00
qt_configure_add_summary_entry (
A R G S " o p t i m i z e _ f u l l "
)
2021-02-12 15:53:07 +00:00
# special case end
2020-03-02 17:06:46 +00:00
qt_configure_add_summary_entry ( ARGS "shared" )
2020-03-24 15:29:54 +00:00
qt_configure_add_summary_entry (
T Y P E " f i r s t A v a i l a b l e F e a t u r e "
A R G S " c 1 1 c 9 9 c 8 9 "
M E S S A G E " U s i n g C s t a n d a r d "
)
2020-03-02 17:06:46 +00:00
qt_configure_add_summary_entry (
T Y P E " f i r s t A v a i l a b l e F e a t u r e "
2021-02-09 12:12:09 +00:00
A R G S " c + + 2 0 c + + 1 7 c + + 1 4 c + + 1 1 "
2020-03-02 17:06:46 +00:00
M E S S A G E " U s i n g C + + s t a n d a r d "
)
qt_configure_add_summary_entry (
A R G S " c c a c h e "
C O N D I T I O N UNIX
)
2020-08-20 07:06:16 +00:00
qt_configure_add_summary_entry (
T Y P E " f i r s t A v a i l a b l e F e a t u r e "
A R G S " u s e _ b f d _ l i n k e r u s e _ g o l d _ l i n k e r u s e _ l l d _ l i n k e r "
M E S S A G E " L i n k e r "
C O N D I T I O N Q T _ F E A T U R E _ u s e _ b f d _ l i n k e r O R Q T _ F E A T U R E _ u s e _ g o l d _ l i n k e r O R Q T _ F E A T U R E _ u s e _ l l d _ l i n k e r
)
2020-03-02 17:06:46 +00:00
qt_configure_add_summary_entry (
A R G S " e n a b l e _ n e w _ d t a g s "
C O N D I T I O N L I N U X
)
qt_configure_add_summary_entry (
A R G S " e n a b l e _ g d b _ i n d e x "
C O N D I T I O N G C C A N D N O T C L A N G AND ( QT_FEATURE_debug OR QT_FEATURE_force_debug_info OR QT_FEATURE_debug_and_release )
)
qt_configure_add_summary_entry ( ARGS "relocatable" )
qt_configure_add_summary_entry ( ARGS "precompile_header" )
qt_configure_add_summary_entry ( ARGS "ltcg" )
qt_configure_add_summary_section ( NAME "Target compiler supports" )
qt_configure_add_summary_entry (
T Y P E " f e a t u r e L i s t "
A R G S " s s e 2 s s e 3 s s s e 3 s s e 4 _ 1 s s e 4 _ 2 "
M E S S A G E " S S E "
CONDITION ( ( TEST_architecture_arch STREQUAL i386 ) OR ( TEST_architecture_arch STREQUAL x86_64 ) )
)
qt_configure_add_summary_entry (
T Y P E " f e a t u r e L i s t "
A R G S " a v x a v x 2 "
M E S S A G E " A V X "
CONDITION ( ( TEST_architecture_arch STREQUAL i386 ) OR ( TEST_architecture_arch STREQUAL x86_64 ) )
)
qt_configure_add_summary_entry (
T Y P E " f e a t u r e L i s t "
A R G S " a v x 5 1 2 f a v x 5 1 2 e r a v x 5 1 2 c d a v x 5 1 2 p f a v x 5 1 2 d q a v x 5 1 2 b w a v x 5 1 2 v l a v x 5 1 2 i f m a a v x 5 1 2 v b m i "
M E S S A G E " A V X 5 1 2 "
CONDITION ( ( TEST_architecture_arch STREQUAL i386 ) OR ( TEST_architecture_arch STREQUAL x86_64 ) )
)
qt_configure_add_summary_entry (
T Y P E " f e a t u r e L i s t "
A R G S " a e s n i f 1 6 c r d r n d s h a n i "
M E S S A G E " O t h e r x 8 6 "
CONDITION ( ( TEST_architecture_arch STREQUAL i386 ) OR ( TEST_architecture_arch STREQUAL x86_64 ) )
)
qt_configure_add_summary_entry (
A R G S " x 8 6 S i m d A l w a y s "
CONDITION ( ( TEST_architecture_arch STREQUAL i386 ) OR ( TEST_architecture_arch STREQUAL x86_64 ) ) A N D N O T MSVC
)
qt_configure_add_summary_entry (
A R G S " n e o n "
CONDITION ( TEST_architecture_arch STREQUAL arm ) OR ( TEST_architecture_arch STREQUAL arm64 )
)
qt_configure_add_summary_entry (
A R G S " m i p s _ d s p "
CONDITION ( TEST_architecture_arch STREQUAL mips )
)
qt_configure_add_summary_entry (
A R G S " m i p s _ d s p r 2 "
CONDITION ( TEST_architecture_arch STREQUAL mips )
)
qt_configure_end_summary_section ( ) # end of "Target compiler supports" section
qt_configure_add_summary_section ( NAME "Sanitizers" )
qt_configure_add_summary_entry ( ARGS "sanitize_address" )
qt_configure_add_summary_entry ( ARGS "sanitize_thread" )
qt_configure_add_summary_entry ( ARGS "sanitize_memory" )
qt_configure_add_summary_entry ( ARGS "sanitize_fuzzer_no_link" )
qt_configure_add_summary_entry ( ARGS "sanitize_undefined" )
qt_configure_end_summary_section ( ) # end of "Sanitizers" section
qt_configure_add_summary_entry (
T Y P E " f i r s t A v a i l a b l e F e a t u r e "
A R G S " c o v e r a g e _ t r a c e _ p c _ g u a r d c o v e r a g e _ s o u r c e _ b a s e d "
M E S S A G E " C o d e C o v e r a g e I n s t r u m e n t a t i o n "
C O N D I T I O N Q T _ F E A T U R E _ c o v e r a g e
)
2020-03-26 16:28:20 +00:00
qt_configure_add_summary_build_parts ( "Build parts" )
2020-03-02 17:06:46 +00:00
qt_configure_add_summary_entry (
A R G S " a p p s t o r e - c o m p l i a n t "
2020-06-05 07:24:37 +00:00
C O N D I T I O N APPLE O R A N D R O I D O R WIN32
2020-03-02 17:06:46 +00:00
)
qt_configure_end_summary_section ( ) # end of "Build options" section
qt_configure_add_summary_section ( NAME "Qt modules and options" )
qt_configure_add_summary_entry ( ARGS "concurrent" )
qt_configure_add_summary_entry ( ARGS "dbus" )
qt_configure_add_summary_entry ( ARGS "dbus-linked" )
qt_configure_add_summary_entry ( ARGS "gui" )
qt_configure_add_summary_entry ( ARGS "network" )
qt_configure_add_summary_entry ( ARGS "sql" )
qt_configure_add_summary_entry ( ARGS "testlib" )
qt_configure_add_summary_entry ( ARGS "widgets" )
qt_configure_add_summary_entry ( ARGS "xml" )
qt_configure_end_summary_section ( ) # end of "Qt modules and options" section
qt_configure_add_summary_section ( NAME "Support enabled for" )
qt_configure_add_summary_entry ( ARGS "pkg-config" )
qt_configure_add_summary_entry ( ARGS "libudev" )
qt_configure_add_summary_entry ( ARGS "system-zlib" )
qt_configure_add_summary_entry ( ARGS "zstd" )
2020-09-03 08:29:41 +00:00
qt_configure_add_summary_entry ( ARGS "thread" )
2020-03-02 17:06:46 +00:00
qt_configure_end_summary_section ( ) # end of "Support enabled for" section
qt_configure_add_report_entry (
T Y P E N O T E
M E S S A G E " U s i n g s t a t i c l i n k i n g w i l l d i s a b l e t h e u s e o f d y n a m i c a l l y l o a d e d p l u g i n s . M a k e s u r e t o i m p o r t a l l n e e d e d s t a t i c p l u g i n s , o r c o m p i l e n e e d e d m o d u l e s i n t o t h e l i b r a r y . "
C O N D I T I O N N O T Q T _ F E A T U R E _ s h a r e d
)
2020-10-15 06:42:16 +00:00
# special case begin
# qt_configure_add_report_entry(
# TYPE ERROR
# MESSAGE "Debug build wihtout Release build is not currently supported on ios see QTBUG-71990. Use -debug-and-release."
# CONDITION IOS AND QT_FEATURE_debug AND NOT QT_FEATURE_debug_and_release
# )
# special case end
2020-03-02 17:06:46 +00:00
qt_configure_add_report_entry (
T Y P E W A R N I N G
M E S S A G E " - d e b u g - a n d - r e l e a s e i s o n l y s u p p o r t e d o n D a r w i n a n d W i n d o w s p l a t f o r m s . Q t c a n b e b u i l t i n r e l e a s e m o d e w i t h s e p a r a t e d e b u g i n f o r m a t i o n , s o - d e b u g - a n d - r e l e a s e i s n o l o n g e r n e c e s s a r y . "
C O N D I T I O N I N P U T _ d e b u g _ a n d _ r e l e a s e S T R E Q U A L ' y e s ' A N D N O T APPLE A N D N O T WIN32
)
qt_configure_add_report_entry (
T Y P E E R R O R
M E S S A G E " d e b u g - o n l y f r a m e w o r k b u i l d s a r e n o t s u p p o r t e d . C o n f i g u r e w i t h - n o - f r a m e w o r k i f y o u w a n t a p u r e d e b u g b u i l d . "
C O N D I T I O N Q T _ F E A T U R E _ f r a m e w o r k A N D Q T _ F E A T U R E _ d e b u g A N D N O T Q T _ F E A T U R E _ d e b u g _ a n d _ r e l e a s e
)
CMake: Handle automatic rpath embedding correctly
Instead of using CMAKE_INSTALL_RPATH to embed an absolute path
to prefix/libdir into all targets, use the more sophisticated aproach
that qmake does.
For certain targets (modules, plugins, tools) use relative rpaths.
Otherwise embed absolute paths (examples, regular binaries).
Installed tests currently have no rpaths.
On certain platforms rpaths are not used (Windows, Android,
iOS / uikit).
Frameworks, app bundles and shallow bundles should also be handled
correctly.
Additional rpaths can be provided via QT_EXTRA_RPATHS variable
(similar to the -R option that configure takes).
Automatic embedding can be disabled either via QT_FEATURE_rpath=OFF
or QT_DISABLE_RPATH=ON.
Note that installed examples are not relocatable at the moment (due
to always having an absolute path rpath), so this is a missing feature
compared to qmake. This is due to missing information on where
examples will be installed, so a relative rpath can not be computed.
By default a Qt installation is relocatable, so there is no need to
pass -DQT_EXTRA_RPATHS=. like Coin used to do with qmake e.g. -R .
Relative rpaths will have the appropriate 'relative base' prefixed
to them (e.g $ORIGIN on linux and @loader_path on darwin platforms).
There is currently no support for other platforms that might have a
different 'relative base' than the ones mentioned above.
Any extra rpaths are saved to BuildInternalsExtra which are re-used
when building other repositories.
configurejson2cmake modified to include correct conditions for the
rpath feature.
It's very likely that we will need a new qt_add_internal_app()
function for gui apps that are to be installed to prefix/bin.
For example for Assistant from qttools. Currently such apps
use qt_add_executable().
The distinction is necessary to make sure that relative rpaths are
embedded into apps, but not executables (which tests are part of).
Amends e835a6853b9c0fb7af32798ed8965de3adf0e15b
Task-number: QTBUG-83497
Change-Id: I3510f63c0a59489741116cc8ec3ef6a0a7704f25
Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>
2020-04-15 16:48:26 +00:00
qt_configure_add_report_entry (
T Y P E E R R O R
M E S S A G E " S t a t i c b u i l d s d o n ' t s u p p o r t R P A T H "
CONDITION ( QT_FEATURE_rpath OR QT_EXTRA_RPATHS ) A N D N O T Q T _ F E A T U R E _ s h a r e d
)
2020-03-02 17:06:46 +00:00
qt_configure_add_report_entry (
T Y P E E R R O R
M E S S A G E " C o m m a n d l i n e o p t i o n - c o v e r a g e i s o n l y s u p p o r t e d w i t h c l a n g c o m p i l e r s . "
C O N D I T I O N Q T _ F E A T U R E _ c o v e r a g e A N D N O T C L A N G
)
qt_configure_add_report_entry (
T Y P E E R R O R
M E S S A G E " C o m m a n d l i n e o p t i o n - s a n i t i z e f u z z e r - n o - l i n k i s o n l y s u p p o r t e d w i t h c l a n g c o m p i l e r s . "
C O N D I T I O N Q T _ F E A T U R E _ s a n i t i z e _ f u z z e r _ n o _ l i n k A N D N O T C L A N G
)
2021-03-15 11:21:55 +00:00
# special case begin
qt_configure_add_report_entry (
T Y P E E R R O R
M E S S A G E " S e t t i n g a l i b r a r y i n f i x i s n o t s u p p o r t e d f o r f r a m e w o r k b u i l d s . "
C O N D I T I O N Q T _ F E A T U R E _ f r a m e w o r k A N D D E F I N E D Q T _ L I B I N F I X
)
2020-09-03 08:29:41 +00:00
qt_configure_add_report_entry (
T Y P E N O T E
M E S S A G E " U s i n g p t h r e a d s "
C O N D I T I O N Q T _ F E A T U R E _ t h r e a d
)
qt_configure_add_report_entry (
T Y P E W A R N I N G
M E S S A G E " Y o u s h o u l d u s e t h e r e c o m m e n d e d W a s m v e r s i o n $ { Q T _ E M C C _ R E C O M M E N D E D _ V E R S I O N } w i t h t h i s Q t . Y o u h a v e $ { E M C C _ V E R S I O N } . "
C O N D I T I O N W A S M A N D N O T $ { E M C C _ V E R S I O N } M A T C H E S $ { Q T _ E M C C _ R E C O M M E N D E D _ V E R S I O N }
)
if ( WASM )
qt_extra_definition ( "QT_EMCC_VERSION" "\" ${ EMCC_VERSION } \"" PUBLIC )
endif ( )
2021-03-15 11:21:55 +00:00
# special case end
2018-10-24 13:20:27 +00:00
qt_extra_definition ( "QT_VERSION_STR" "\" ${ PROJECT_VERSION } \"" PUBLIC )
qt_extra_definition ( "QT_VERSION_MAJOR" ${ PROJECT_VERSION_MAJOR } PUBLIC )
qt_extra_definition ( "QT_VERSION_MINOR" ${ PROJECT_VERSION_MINOR } PUBLIC )
qt_extra_definition ( "QT_VERSION_PATCH" ${ PROJECT_VERSION_PATCH } PUBLIC )
2020-09-03 08:29:41 +00:00