summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAlexey Edelev <alexey.edelev@qt.io>2022-02-08 14:41:21 +0100
committerQt Cherry-pick Bot <cherrypick_bot@qt-project.org>2022-02-08 15:50:23 +0000
commit4b3948fe9f50301cc11a30cb77e9141ea414dd89 (patch)
treee35d1dada565f7e7714b931a7e3b7d9a05e2636a
parentfa53e4d69fb4084e7e2443db0091b73d32ded266 (diff)
Fix the 'generatedOutput' qdoc test
Add the config-related subfolder to the 'qdocincludepaths.inc' path. Also add the missing dependency to Qt::qdoc target, since the test implicitly uses the qdoc binary. Fixes: QTBUG-100308 Change-Id: I2adc8be9d8718967ac2719d528e67bcae8f0ea3b Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io> (cherry picked from commit 74ed1a3aafcd8773be812d36838360961ee311db) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
-rw-r--r--tests/auto/qdoc/generatedoutput/CMakeLists.txt10
1 files changed, 9 insertions, 1 deletions
diff --git a/tests/auto/qdoc/generatedoutput/CMakeLists.txt b/tests/auto/qdoc/generatedoutput/CMakeLists.txt
index c1a4cd79e..20bf8833b 100644
--- a/tests/auto/qdoc/generatedoutput/CMakeLists.txt
+++ b/tests/auto/qdoc/generatedoutput/CMakeLists.txt
@@ -12,8 +12,14 @@ qt_internal_add_test(tst_generatedOutput
)
# Write relevant Qt include path to a file, to be read in by QDoc
+set(config_subfolder "")
+get_cmake_property(is_multi_config GENERATOR_IS_MULTI_CONFIG)
+if(is_multi_config)
+ set(config_subfolder "$<CONFIG>/")
+endif()
+set(includepathsfile "${CMAKE_CURRENT_BINARY_DIR}/${config_subfolder}qdocincludepaths.inc")
set(framework_path "\n")
-set(includepathsfile "${CMAKE_CURRENT_BINARY_DIR}/qdocincludepaths.inc")
+
find_package(Qt6 COMPONENTS Core REQUIRED)
if(Qt6Core_FOUND)
get_target_property(include_paths Qt6::Core INTERFACE_INCLUDE_DIRECTORIES)
@@ -29,3 +35,5 @@ endwhile()
set (include_paths "$<TARGET_PROPERTY:tst_generatedOutput,INCLUDE_DIRECTORIES>")
file(GENERATE OUTPUT ${includepathsfile} CONTENT "-I$<JOIN:${include_paths},\n-I>${framework_path}")
+
+add_dependencies(tst_generatedOutput Qt::qdoc)