aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAlexandru Croitor <alexandru.croitor@qt.io>2020-06-04 18:55:51 +0200
committerAlexandru Croitor <alexandru.croitor@qt.io>2020-06-04 22:27:33 +0200
commitded331ce62698369855511cd266d857d6d677fd3 (patch)
treefdbe33bbf4321eb07ad043afb4901603af23a933
parent70dd5e24ce29adeab48932082863b3e3e3e4ba47 (diff)
CMake: Regenerate configure.cmake files
This will cause cmake to show the usual configure reports. Needed to add a custom function to find python (not currently used though, except for the configure report). Change-Id: Id68efc5badeaa30834a37fe751c1d5b6bfd96d92 Reviewed-by: Cristian Adam <cristian.adam@qt.io>
-rw-r--r--cmake/QtDeclarativeSetup.cmake12
-rw-r--r--src/qml/.prev_configure.cmake206
-rw-r--r--src/qml/configure.cmake22
-rw-r--r--src/qmlmodels/configure.cmake4
-rw-r--r--src/quick/configure.cmake17
5 files changed, 260 insertions, 1 deletions
diff --git a/cmake/QtDeclarativeSetup.cmake b/cmake/QtDeclarativeSetup.cmake
index 2cd6f56127..d8e4719dbf 100644
--- a/cmake/QtDeclarativeSetup.cmake
+++ b/cmake/QtDeclarativeSetup.cmake
@@ -46,3 +46,15 @@ function(qt_declarative_generate_reg_exp_jit_tables consuming_target)
target_sources(${consuming_target} PRIVATE ${output_file})
target_include_directories(${consuming_target} PRIVATE $<BUILD_INTERFACE:${generate_dir}>)
endfunction()
+
+function(qt_qml_find_python out_var_path out_var_found)
+ find_program(QT_QML_PYTHON_PATH
+ NAMES python python2 python3 py
+ DOC "Qt Declarative python path")
+ if(QT_QML_PYTHON_PATH)
+ set(${out_var_path} "${QT_QML_PYTHON_PATH}" PARENT_SCOPE)
+ set(${out_var_found} "TRUE" PARENT_SCOPE)
+ else()
+ set(${out_var_found} "FALSE" PARENT_SCOPE)
+ endif()
+endfunction()
diff --git a/src/qml/.prev_configure.cmake b/src/qml/.prev_configure.cmake
new file mode 100644
index 0000000000..3cf4826bbb
--- /dev/null
+++ b/src/qml/.prev_configure.cmake
@@ -0,0 +1,206 @@
+
+
+#### Inputs
+
+
+
+#### Libraries
+
+
+
+#### Tests
+
+# cxx14_make_unique
+qt_config_compile_test(cxx14_make_unique
+ LABEL "C++14 make_unique()"
+ CODE
+"
+#include <memory>
+
+int main(int argc, char **argv)
+{
+ (void)argc; (void)argv;
+ /* BEGIN TEST: */
+std::unique_ptr<int> ptr = std::make_unique<int>();
+ /* END TEST: */
+ return 0;
+}
+")
+
+# pointer_32bit
+qt_config_compile_test(pointer_32bit
+ LABEL "32bit pointers"
+ CODE
+"
+
+
+int main(int argc, char **argv)
+{
+ (void)argc; (void)argv;
+ /* BEGIN TEST: */
+static_assert(sizeof(void *) == 4, \"fail\");
+ /* END TEST: */
+ return 0;
+}
+")
+
+# pointer_64bit
+qt_config_compile_test(pointer_64bit
+ LABEL "64bit pointers"
+ CODE
+"
+
+
+int main(int argc, char **argv)
+{
+ (void)argc; (void)argv;
+ /* BEGIN TEST: */
+static_assert(sizeof(void *) == 8, \"fail\");
+ /* END TEST: */
+ return 0;
+}
+")
+
+# arm_thumb
+qt_config_compile_test(arm_thumb
+ LABEL "THUMB mode on ARM"
+ CODE
+"
+
+
+int main(int argc, char **argv)
+{
+ (void)argc; (void)argv;
+ /* BEGIN TEST: */
+#if defined(thumb2) || defined(__thumb2__)
+# define THUMB_OK
+#elif (defined(__thumb) || defined(__thumb__)) && __TARGET_ARCH_THUMB-0 == 4
+# define THUMB_OK
+#elif defined(__ARM_ARCH_ISA_THUMB) && __ARM_ARCH_ISA_THUMB == 2
+// clang 3.5 and later will set this if the core supports the Thumb-2 ISA.
+# define THUMB_OK
+#else
+# error \"fail\"
+#endif
+ /* END TEST: */
+ return 0;
+}
+")
+
+# arm_fp
+qt_config_compile_test(arm_fp
+ LABEL "Sufficiently recent FPU on ARM"
+ CODE
+"
+
+
+int main(int argc, char **argv)
+{
+ (void)argc; (void)argv;
+ /* BEGIN TEST: */
+// if !defined(__ARM_FP) we might be on MSVC or we might have a device
+// without an FPU.
+// TODO: The latter case is not supported, but the test still succeeds.
+#if defined(__ARM_FP) && (__ARM_FP <= 0x04)
+# error \"fail\"
+#endif
+ /* END TEST: */
+ return 0;
+}
+")
+
+
+
+#### Features
+
+qt_feature("cxx14_make_unique" PRIVATE
+ LABEL "C++14 make_unique"
+ CONDITION QT_FEATURE_cxx14 OR TEST_cxx14_make_unique
+)
+qt_feature("qml-network" PUBLIC
+ SECTION "QML"
+ LABEL "QML network support"
+ PURPOSE "Provides network transparency."
+ CONDITION QT_FEATURE_network
+)
+# On arm and arm64 we need a specialization of cacheFlush() for each OS to be enabeled. Therefore the config white list. Also Mind that e.g. x86_32 has arch.x86_64 but 32bit pointers. Therefore the checks for architecture and pointer size. Finally, ios and tvos can technically use the JIT but Apple does not allow it. Therefore, it's disabled by default.
+qt_feature("qml-jit" PRIVATE
+ SECTION "QML"
+ LABEL "QML just-in-time compiler"
+ PURPOSE "Provides a JIT for QML and JavaScript"
+ AUTODETECT NOT IOS AND NOT TVOS
+ CONDITION ( ( ( TEST_architecture_arch STREQUAL i386 ) AND TEST_pointer_32bit AND QT_FEATURE_sse2 ) OR ( ( TEST_architecture_arch STREQUAL x86_64 ) AND TEST_pointer_64bit AND QT_FEATURE_sse2 ) OR ( ( TEST_architecture_arch STREQUAL arm ) AND TEST_pointer_32bit AND TEST_arm_fp AND TEST_arm_thumb AND ( LINUX OR IOS OR TVOS OR QNX ) ) OR ( ( TEST_architecture_arch STREQUAL arm64 ) AND TEST_pointer_64bit AND TEST_arm_fp AND ( LINUX OR IOS OR TVOS OR QNX OR INTEGRITY ) ) )
+)
+qt_feature("qml-debug" PUBLIC
+ SECTION "QML"
+ LABEL "QML debugging and profiling support"
+ PURPOSE "Provides infrastructure and plugins for debugging and profiling."
+)
+qt_feature("qml-profiler" PRIVATE
+ SECTION "QML"
+ LABEL "Command line QML Profiler"
+ PURPOSE "Supports retrieving QML tracing data from an application."
+ CONDITION ( QT_FEATURE_commandlineparser ) AND ( QT_FEATURE_qml_debug ) AND ( QT_FEATURE_qml_network AND QT_FEATURE_localserver ) AND ( QT_FEATURE_xmlstreamwriter )
+)
+qt_feature("qml-preview" PRIVATE
+ SECTION "QML"
+ LABEL "Command line QML Preview tool"
+ PURPOSE "Updates QML documents in your application live as you change them on disk"
+ CONDITION ( QT_FEATURE_commandlineparser ) AND ( QT_FEATURE_filesystemwatcher ) AND ( QT_FEATURE_qml_network AND QT_FEATURE_localserver ) AND ( QT_FEATURE_process ) AND ( QT_FEATURE_qml_debug )
+)
+qt_feature("qml-devtools" PRIVATE
+ SECTION "QML"
+ LABEL "QML Development Tools"
+ PURPOSE "Provides the QmlDevtools library and various utilities."
+)
+qt_feature("qml-sequence-object" PRIVATE
+ SECTION "QML"
+ LABEL "QML sequence object"
+ PURPOSE "Supports mapping sequence types into QML."
+)
+qt_feature("qml-xml-http-request" PRIVATE
+ SECTION "QML"
+ LABEL "QML XML http request"
+ PURPOSE "Provides support for sending XML http requests."
+ CONDITION ( QT_FEATURE_xmlstreamreader ) AND ( QT_FEATURE_qml_network )
+)
+qt_feature("qml-locale" PRIVATE
+ SECTION "QML"
+ LABEL "QML Locale"
+ PURPOSE "Provides support for locales in QML."
+)
+qt_feature("qml-animation" PRIVATE
+ SECTION "QML"
+ LABEL "QML Animations"
+ PURPOSE "Provides support for animations and timers in QML."
+ CONDITION QT_FEATURE_animation
+)
+qt_feature("qml-worker-script" PRIVATE
+ SECTION "QML"
+ LABEL "QML WorkerScript"
+ PURPOSE "Enables the use of threads in QML."
+ CONDITION QT_FEATURE_thread
+)
+qt_feature("qml-itemmodel" PRIVATE
+ SECTION "QML"
+ LABEL "QML Item Model"
+ PURPOSE "Provides the item model for item views in QML"
+ CONDITION QT_FEATURE_itemmodel
+)
+qt_feature("qml-python" PRIVATE
+ LABEL "python"
+ CONDITION tests.qml-python OR FIXME
+)
+qt_configure_add_summary_section(NAME "Qt QML")
+qt_configure_add_summary_entry(ARGS "qml-network")
+qt_configure_add_summary_entry(ARGS "qml-debug")
+qt_configure_add_summary_entry(ARGS "qml-jit")
+qt_configure_add_summary_entry(ARGS "qml-sequence-object")
+qt_configure_add_summary_entry(ARGS "qml-xml-http-request")
+qt_configure_add_summary_entry(ARGS "qml-locale")
+qt_configure_end_summary_section() # end of "Qt QML" section
+qt_configure_add_report_entry(
+ TYPE ERROR
+ MESSAGE "Python is required to build QtQml."
+ CONDITION NOT QT_FEATURE_qml_python
+)
diff --git a/src/qml/configure.cmake b/src/qml/configure.cmake
index 00936ff53c..21acf9efa7 100644
--- a/src/qml/configure.cmake
+++ b/src/qml/configure.cmake
@@ -187,3 +187,25 @@ qt_feature("qml-itemmodel" PRIVATE
PURPOSE "Provides the item model for item views in QML"
CONDITION QT_FEATURE_itemmodel
)
+
+# special case begin
+qt_qml_find_python(__qt_qml_python_path __qt_qml_python_found)
+# special case end
+
+qt_feature("qml-python" PRIVATE
+ LABEL "python"
+ CONDITION __qt_qml_python_found # special case
+)
+qt_configure_add_summary_section(NAME "Qt QML")
+qt_configure_add_summary_entry(ARGS "qml-network")
+qt_configure_add_summary_entry(ARGS "qml-debug")
+qt_configure_add_summary_entry(ARGS "qml-jit")
+qt_configure_add_summary_entry(ARGS "qml-sequence-object")
+qt_configure_add_summary_entry(ARGS "qml-xml-http-request")
+qt_configure_add_summary_entry(ARGS "qml-locale")
+qt_configure_end_summary_section() # end of "Qt QML" section
+qt_configure_add_report_entry(
+ TYPE ERROR
+ MESSAGE "Python is required to build QtQml."
+ CONDITION NOT QT_FEATURE_qml_python
+)
diff --git a/src/qmlmodels/configure.cmake b/src/qmlmodels/configure.cmake
index 44643c88a6..fa3a410591 100644
--- a/src/qmlmodels/configure.cmake
+++ b/src/qmlmodels/configure.cmake
@@ -37,3 +37,7 @@ qt_feature("qml-table-model" PRIVATE
PURPOSE "Provides the TableModel QML type."
CONDITION QT_FEATURE_qml_itemmodel AND QT_FEATURE_qml_delegate_model
)
+qt_configure_add_summary_section(NAME "Qt QML Models")
+qt_configure_add_summary_entry(ARGS "qml-list-model")
+qt_configure_add_summary_entry(ARGS "qml-delegate-model")
+qt_configure_end_summary_section() # end of "Qt QML Models" section
diff --git a/src/quick/configure.cmake b/src/quick/configure.cmake
index 1685ca63ef..65fe462b51 100644
--- a/src/quick/configure.cmake
+++ b/src/quick/configure.cmake
@@ -72,7 +72,7 @@ qt_feature("quick-path" PRIVATE
SECTION "Qt Quick"
LABEL "Path support"
PURPOSE "Provides Path elements."
- CONDITION QT_FEATURE_quick_shadereffect
+ CONDITION TARGET Qt::Gui
)
qt_feature("quick-pathview" PRIVATE
SECTION "Qt Quick"
@@ -107,3 +107,18 @@ qt_feature("quick-draganddrop" PUBLIC
PURPOSE "Drag and drop support for Qt Quick"
CONDITION ( QT_FEATURE_draganddrop ) AND ( QT_FEATURE_regularexpression )
)
+qt_configure_add_summary_section(NAME "Qt Quick")
+qt_configure_add_summary_entry(ARGS "quick-animatedimage")
+qt_configure_add_summary_entry(ARGS "quick-canvas")
+qt_configure_add_summary_entry(ARGS "quick-designer")
+qt_configure_add_summary_entry(ARGS "quick-flipable")
+qt_configure_add_summary_entry(ARGS "quick-gridview")
+qt_configure_add_summary_entry(ARGS "quick-listview")
+qt_configure_add_summary_entry(ARGS "quick-tableview")
+qt_configure_add_summary_entry(ARGS "quick-path")
+qt_configure_add_summary_entry(ARGS "quick-pathview")
+qt_configure_add_summary_entry(ARGS "quick-positioners")
+qt_configure_add_summary_entry(ARGS "quick-repeater")
+qt_configure_add_summary_entry(ARGS "quick-shadereffect")
+qt_configure_add_summary_entry(ARGS "quick-sprite")
+qt_configure_end_summary_section() # end of "Qt Quick" section