aboutsummaryrefslogtreecommitdiff
path: root/tests/CMakeLists.txt
diff options
context:
space:
mode:
authorAlex Merry <alex.merry@kde.org>2015-11-15 15:09:48 +0000
committerAlex Merry <alex.merry@kde.org>2015-11-22 10:39:45 +0000
commitc941061aa989bba945e296aad47df22f9c8ddd5f (patch)
tree02ce7b041d556579bd2c8c3c224776553c8cc5bd /tests/CMakeLists.txt
parent8f0cbc9f8a8e3b60df6755da1d7d5369ef37b8f2 (diff)
downloadextra-cmake-modules-c941061aa989bba945e296aad47df22f9c8ddd5f.tar.gz
extra-cmake-modules-c941061aa989bba945e296aad47df22f9c8ddd5f.tar.bz2
Overhaul the ECM build system.
It should now be easier to read, and more featureful. Among other tweaks, we now print a summary of dependencies and build options, and the documentation is generated with more sensible breadcrumbs and builds properly with Sphinx 1.3. REVIEW: 126075
Diffstat (limited to 'tests/CMakeLists.txt')
-rw-r--r--tests/CMakeLists.txt35
1 files changed, 32 insertions, 3 deletions
diff --git a/tests/CMakeLists.txt b/tests/CMakeLists.txt
index 9e6de12f..1a66f563 100644
--- a/tests/CMakeLists.txt
+++ b/tests/CMakeLists.txt
@@ -1,9 +1,41 @@
+#=============================================================================
+# Copyright 2011 Alex Neundorf <neundorf@kde.org>
+# Copyright 2014-2015 Alex Merry <alex.merry@kde.org>
+#
+# Distributed under the OSI-approved BSD License (the "License");
+# see accompanying file COPYING-CMAKE-SCRIPTS for details.
+#
+# This software is distributed WITHOUT ANY WARRANTY; without even the
+# implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
+# See the License for more information.
+#=============================================================================
+
# We need to set a language to find CMake packages installed in
# architecture-dependent locations (like /usr/lib64).
# We only set this for the tests, making sure it does not interfere
# with other files (as ECM itself is architecture-independent).
project(ECMTests C)
+find_package(Qt5LinguistTools CONFIG)
+set_package_properties(
+ Qt5LinguistTools
+ PROPERTIES
+ URL "http://www.qt.io/"
+ DESCRIPTION "Qt5 linguist tools."
+ TYPE OPTIONAL
+ PURPOSE "Required to run tests for the ECMPoQmTools module."
+)
+
+find_package(Qt5Core CONFIG)
+set_package_properties(
+ Qt5Core
+ PROPERTIES
+ URL "http://www.qt.io/"
+ DESCRIPTION "Qt5 core library."
+ TYPE OPTIONAL
+ PURPOSE "Required to run tests for the ECMQtDeclareLoggingCategory module, and for some tests of the KDEInstallDirs module."
+)
+
add_subdirectory(ECMAddTests)
add_subdirectory(ECMGenerateHeadersTest)
add_subdirectory(ECMSetupVersionTest)
@@ -30,8 +62,6 @@ macro(add_test_macro NAME)
add_test_variant("${NAME}" "${NAME}" ${ARGN})
endmacro()
-find_package(Qt5LinguistTools CONFIG)
-
add_test_macro(ExecuteCoreModules dummy)
add_test_macro(ExecuteKDEModules dummy)
@@ -73,7 +103,6 @@ set(KDEInstallDirsTest.relative_or_absolute_usr_EXTRA_OPTIONS
add_test_variant(KDEInstallDirsTest.relative_or_absolute_usr
KDEInstallDirsTest.relative_or_absolute dummy)
-find_package(Qt5Core QUIET)
if (TARGET Qt5::qmake)
set(KDEInstallDirsTest.relative_or_absolute_qt_EXTRA_OPTIONS
--build-options -DKDE_INSTALL_USE_QT_SYS_PATHS=TRUE