summaryrefslogtreecommitdiffstats
path: root/src/qdoc/qdoc/tests/config/CMakeLists.txt
diff options
context:
space:
mode:
authorLuca Di Sera <luca.disera@qt.io>2023-08-07 13:57:36 +0200
committerLuca Di Sera <luca.disera@qt.io>2023-08-07 16:10:04 +0200
commitadc95e7438a92732c9dae5bf282e9d7b8dd4761e (patch)
treeba1bbdf3db7e029e4a2d14eb3a6dda47a57c0bc9 /src/qdoc/qdoc/tests/config/CMakeLists.txt
parent926959d2fefae25c8089b8ce89e949b13af7092c (diff)
QDoc: Move tst_config under src
QDoc is currently restructuring its source code to simplify certain expected future developments. As part of this restructuring, all tests have been moving from the "tests" directory to an appropriate place under the "src" directory. `tst_config` tests some internal components of QDoc that are currently only exposed as part of the source code for the QDoc's binary. It was previously positioned under the "test" directory and is now moved under the "src/qdoc/test" directory, as part of the restructuring. The "CMakeLists.txt" file under "src/qdoc/qdoc/test" was modified to dispatch to the moved "config" test directory. The "CMakeLists.txt" file for `tst_config` was modified to support the new positioning in the file tree. Mainly, each path in it was modified to be prefixed by `${CMAKE_CURRENT_LIST_DIR}` to ensure their correct resolution when using CMake's `include`. The "CMakeLists.txt" file in "tests/auto/qdoc" was modified to include "src/qdoc/qdoc/tests/config/CMakeLists.txt", to ensure that `tst_config` is able to run in CI. Change-Id: I771535b93e50ced315c6894c17feaed7a8fb662f Reviewed-by: Paul Wicking <paul.wicking@qt.io> Reviewed-by: Topi Reiniƶ <topi.reinio@qt.io>
Diffstat (limited to 'src/qdoc/qdoc/tests/config/CMakeLists.txt')
-rw-r--r--src/qdoc/qdoc/tests/config/CMakeLists.txt24
1 files changed, 24 insertions, 0 deletions
diff --git a/src/qdoc/qdoc/tests/config/CMakeLists.txt b/src/qdoc/qdoc/tests/config/CMakeLists.txt
new file mode 100644
index 000000000..ef483291d
--- /dev/null
+++ b/src/qdoc/qdoc/tests/config/CMakeLists.txt
@@ -0,0 +1,24 @@
+# Copyright (C) 2022 The Qt Company Ltd.
+# SPDX-License-Identifier: BSD-3-Clause
+
+#####################################################################
+## tst_config Test:
+#####################################################################
+
+if(NOT QT_BUILD_STANDALONE_TESTS AND NOT QT_BUILDING_QT)
+ cmake_minimum_required(VERSION 3.16)
+ project(tst_config LANGUAGES CXX)
+ find_package(Qt6BuildInternals REQUIRED COMPONENTS STANDALONE_TEST)
+endif()
+
+qt_internal_add_test(tst_config
+ SOURCES
+ ${CMAKE_CURRENT_LIST_DIR}/tst_config.cpp
+
+ ${CMAKE_CURRENT_LIST_DIR}/../../src/qdoc/config.cpp
+ ${CMAKE_CURRENT_LIST_DIR}/../../src/qdoc/location.cpp
+ ${CMAKE_CURRENT_LIST_DIR}/../../src/qdoc/qdoccommandlineparser.cpp
+ ${CMAKE_CURRENT_LIST_DIR}/../../src/qdoc/utilities.cpp
+ INCLUDE_DIRECTORIES
+ ${CMAKE_CURRENT_LIST_DIR}/../../src/
+)