CMake: Add doc_snippets feature
We'd like to compile-test doc_snippets on some configurations. So far, we enable this by checking the private_tests feature, that is in turn enabled by default by developer_build. Let's rather have a separate doc_snippets feature, as we might turn this on and off independently from private tests. In fact, private API shouldn't be used by any of the snippets. Change-Id: Icba8f6af610d7951e65783d8b1700be57584cc4d Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
This commit is contained in:
parent
112a9f96df
commit
ef12478f49
@ -584,6 +584,10 @@ qt_feature("private_tests" PRIVATE
|
||||
LABEL "Developer build: private_tests"
|
||||
CONDITION QT_FEATURE_developer_build
|
||||
)
|
||||
qt_feature("doc_snippets" PRIVATE
|
||||
LABEL "Developer build: doc_snippets"
|
||||
AUTODETECT QT_FEATURE_developer_build
|
||||
)
|
||||
qt_feature_definition("developer-build" "QT_BUILD_INTERNAL")
|
||||
qt_feature_config("developer-build" QMAKE_PUBLIC_QT_CONFIG
|
||||
NAME "private_tests"
|
||||
|
@ -413,10 +413,10 @@ qt_internal_extend_target(Network CONDITION WIN32
|
||||
socket/qnativesocketengine_win.cpp
|
||||
)
|
||||
|
||||
# include the snippet projects for developer-builds
|
||||
if(QT_FEATURE_private_tests)
|
||||
if(QT_FEATURE_doc_snippets)
|
||||
add_subdirectory(doc/snippets/network)
|
||||
endif()
|
||||
|
||||
qt_internal_extend_target(Network
|
||||
# Workaround for QTBUG-118229:
|
||||
# Function called by inline methods taking a pointer to a private class as a parameter
|
||||
|
@ -58,8 +58,7 @@ qt_internal_add_docs(Sql
|
||||
doc/qtsql.qdocconf
|
||||
)
|
||||
|
||||
# include the snippet projects for developer-builds
|
||||
if(QT_FEATURE_private_tests)
|
||||
if(QT_FEATURE_doc_snippets)
|
||||
add_subdirectory(doc/snippets/code)
|
||||
add_subdirectory(doc/snippets/sqldatabase)
|
||||
endif()
|
||||
|
@ -169,8 +169,7 @@ qt_internal_add_docs(Test
|
||||
|
||||
qt_internal_apply_testlib_coverage_options(Test)
|
||||
|
||||
# include the snippet projects for developer-builds
|
||||
if(QT_FEATURE_private_tests)
|
||||
if(QT_FEATURE_doc_snippets)
|
||||
add_subdirectory(doc/snippets/code)
|
||||
endif()
|
||||
|
||||
|
@ -916,8 +916,7 @@ if(IOS)
|
||||
"${CMAKE_CURRENT_SOURCE_DIR}/platform/ios/PrivacyInfo.xcprivacy")
|
||||
endif()
|
||||
|
||||
# include the snippet projects for developer-builds
|
||||
if(QT_FEATURE_private_tests)
|
||||
if(QT_FEATURE_doc_snippets)
|
||||
add_subdirectory(doc/snippets/customviewstyle)
|
||||
if (QT_FEATURE_filedialog)
|
||||
add_subdirectory(doc/snippets/filedialogurls)
|
||||
|
Loading…
x
Reference in New Issue
Block a user