mirror of https://github.com/qt/qtbase.git
Make doc-snippets a "build part", ie -nomake/make doc-snippets
For now the private feature 'doc_snippets' is left as is, and acts as the default for the build-part. Change-Id: I37476f5f7aabe741cc5eb87c801ec47578d6b488 Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io> Reviewed-by: Paul Wicking <paul.wicking@qt.io>
This commit is contained in:
parent
f0667601ac
commit
53f9feae1b
|
@ -93,6 +93,7 @@ set(QT_BUILD_MINIMAL_STATIC_TESTS @QT_BUILD_MINIMAL_STATIC_TESTS@ CACHE BOOL
|
|||
"Build minimal subset of tests for static Qt builds")
|
||||
set(QT_BUILD_MINIMAL_ANDROID_MULTI_ABI_TESTS @QT_BUILD_MINIMAL_ANDROID_MULTI_ABI_TESTS@ CACHE BOOL
|
||||
"Build minimal subset of tests for Android multi-ABI Qt builds")
|
||||
set(QT_BUILD_DOC_SNIPPETS @QT_BUILD_SNIPPETS@ CACHE BOOL "Build Qt documentation snippets")
|
||||
|
||||
set(QT_BUILD_TESTS_BATCHED @QT_BUILD_TESTS_BATCHED@ CACHE BOOL
|
||||
"Should all tests be batched into a single binary.")
|
||||
|
|
|
@ -283,6 +283,13 @@ macro(qt_internal_setup_build_tests)
|
|||
|
||||
option(QT_BUILD_MINIMAL_STATIC_TESTS "Build minimal subset of tests for static Qt builds" ${_qt_wasm_and_batch_tests})
|
||||
|
||||
if((FEATURE_developer_build AND NOT FEATURE_doc_snippets STREQUAL "OFF") OR FEATURE_doc_snippets)
|
||||
set(_qt_build_doc_snippets ON)
|
||||
else()
|
||||
set(_qt_build_doc_snippets OFF)
|
||||
endif()
|
||||
option(QT_BUILD_DOC_SNIPPETS "Build documentation snippets" ${_qt_build_doc_snippets})
|
||||
|
||||
option(QT_BUILD_WASM_BATCHED_TESTS "Build subset of tests for wasm batched tests" ${_qt_wasm_and_batch_tests})
|
||||
|
||||
option(QT_BUILD_MINIMAL_ANDROID_MULTI_ABI_TESTS
|
||||
|
|
|
@ -930,6 +930,10 @@ function(qt_get_build_parts out_var)
|
|||
list(APPEND parts "tools")
|
||||
endif()
|
||||
|
||||
if(QT_BUILD_DOC_SNIPPETS)
|
||||
list(APPEND parts "doc-snippets")
|
||||
endif()
|
||||
|
||||
set(${out_var} ${parts} PARENT_SCOPE)
|
||||
endfunction()
|
||||
|
||||
|
|
|
@ -981,7 +981,8 @@ function(check_qt_build_parts type)
|
|||
set(buildFlag "FALSE")
|
||||
endif()
|
||||
|
||||
list(APPEND knownParts "tests" "examples" "benchmarks" "manual-tests" "minimal-static-tests")
|
||||
list(APPEND knownParts "tests" "examples" "benchmarks" "manual-tests"
|
||||
"minimal-static-tests" "doc-snippets")
|
||||
|
||||
foreach(part ${${input}})
|
||||
if(part IN_LIST knownParts)
|
||||
|
|
|
@ -243,9 +243,10 @@ Component selection:
|
|||
-make <part> ......... Add <part> to the list of parts to be built.
|
||||
Specifying this option clears the default list first.
|
||||
(allowed values: libs, tools, examples, tests,
|
||||
benchmarks, manual-tests, minimal-static-tests)
|
||||
[default: libs and examples, also tools if not
|
||||
cross-building, also tests if -developer-build]
|
||||
benchmarks, manual-tests, minimal-static-tests,
|
||||
doc-snippets) [default: libs and examples, also tools
|
||||
if not cross-building, also tests and doc-snippets if
|
||||
-developer-build]
|
||||
-nomake <part> ....... Exclude <part> from the list of parts to be built.
|
||||
-install-examples-sources Installs examples source code into the Qt prefix
|
||||
Only possible when -make examples is also passed
|
||||
|
|
|
@ -93,7 +93,7 @@ qt_commandline_option(libstdcpp-assertions TYPE boolean NAME libstdcpp_assertion
|
|||
qt_commandline_option(libcpp-hardening TYPE boolean NAME libcpp_hardening)
|
||||
qt_commandline_option(relro-now-linker TYPE boolean NAME relro_now_linker)
|
||||
qt_commandline_option(make TYPE addString VALUES examples libs tests tools
|
||||
benchmarks manual-tests minimal-static-tests)
|
||||
benchmarks manual-tests minimal-static-tests doc-snippets)
|
||||
qt_commandline_option(install-examples-sources
|
||||
TYPE boolean
|
||||
CMAKE_VARIABLE QT_INSTALL_EXAMPLES_SOURCES
|
||||
|
@ -101,7 +101,7 @@ qt_commandline_option(install-examples-sources
|
|||
qt_commandline_option(mips_dsp TYPE boolean)
|
||||
qt_commandline_option(mips_dspr2 TYPE boolean)
|
||||
qt_commandline_option(nomake TYPE addString VALUES examples tests tools benchmarks
|
||||
manual-tests minimal-static-tests)
|
||||
manual-tests minimal-static-tests doc-snippets)
|
||||
qt_commandline_option(opensource TYPE void NAME commercial VALUE no)
|
||||
qt_commandline_option(optimize-debug TYPE boolean NAME optimize_debug)
|
||||
qt_commandline_option(optimize-size TYPE boolean NAME optimize_size)
|
||||
|
|
|
@ -1647,6 +1647,6 @@ function(qt_internal_library_deprecation_level)
|
|||
endfunction()
|
||||
qt_internal_library_deprecation_level()
|
||||
|
||||
if(QT_FEATURE_doc_snippets)
|
||||
if(QT_BUILD_DOC_SNIPPETS)
|
||||
add_subdirectory(doc/snippets)
|
||||
endif()
|
||||
|
|
|
@ -415,7 +415,7 @@ qt_internal_extend_target(Network CONDITION WIN32
|
|||
socket/qnativesocketengine_win.cpp
|
||||
)
|
||||
|
||||
if(QT_FEATURE_doc_snippets)
|
||||
if(QT_BUILD_DOC_SNIPPETS)
|
||||
add_subdirectory(doc/snippets/network)
|
||||
endif()
|
||||
|
||||
|
|
|
@ -58,7 +58,7 @@ qt_internal_add_docs(Sql
|
|||
doc/qtsql.qdocconf
|
||||
)
|
||||
|
||||
if(QT_FEATURE_doc_snippets)
|
||||
if(QT_BUILD_DOC_SNIPPETS)
|
||||
add_subdirectory(doc/snippets/code)
|
||||
add_subdirectory(doc/snippets/sqldatabase)
|
||||
endif()
|
||||
|
|
|
@ -180,7 +180,7 @@ qt_internal_add_docs(Test
|
|||
|
||||
qt_internal_apply_testlib_coverage_options(Test)
|
||||
|
||||
if(QT_FEATURE_doc_snippets)
|
||||
if(QT_BUILD_DOC_SNIPPETS)
|
||||
add_subdirectory(doc/snippets/code)
|
||||
endif()
|
||||
|
||||
|
|
|
@ -924,7 +924,7 @@ if(IOS)
|
|||
"${CMAKE_CURRENT_SOURCE_DIR}/platform/ios/PrivacyInfo.xcprivacy")
|
||||
endif()
|
||||
|
||||
if(QT_FEATURE_doc_snippets)
|
||||
if(QT_BUILD_DOC_SNIPPETS)
|
||||
add_subdirectory(doc/snippets/customviewstyle)
|
||||
if (QT_FEATURE_filedialog)
|
||||
add_subdirectory(doc/snippets/filedialogurls)
|
||||
|
|
Loading…
Reference in New Issue