diff options
author | Alex Merry <alex.merry@kde.org> | 2015-11-15 15:09:48 +0000 |
---|---|---|
committer | Alex Merry <alex.merry@kde.org> | 2015-11-22 10:39:45 +0000 |
commit | c941061aa989bba945e296aad47df22f9c8ddd5f (patch) | |
tree | 02ce7b041d556579bd2c8c3c224776553c8cc5bd /tests | |
parent | 8f0cbc9f8a8e3b60df6755da1d7d5369ef37b8f2 (diff) | |
download | extra-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')
-rw-r--r-- | tests/CMakeLists.txt | 35 | ||||
-rw-r--r-- | tests/ECMGenerateHeadersTest/CMakeLists.txt | 2 | ||||
-rw-r--r-- | tests/ECMGeneratePkgConfigFile/CMakeLists.txt | 2 |
3 files changed, 34 insertions, 5 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 diff --git a/tests/ECMGenerateHeadersTest/CMakeLists.txt b/tests/ECMGenerateHeadersTest/CMakeLists.txt index 9f407cb0..abf32cfb 100644 --- a/tests/ECMGenerateHeadersTest/CMakeLists.txt +++ b/tests/ECMGenerateHeadersTest/CMakeLists.txt @@ -1,4 +1,4 @@ -set(MODULES_DIR "${extra-cmake-modules_SOURCE_DIR}/modules") +set(MODULES_DIR "${ECM_SOURCE_DIR}/modules") configure_file(run_test.cmake.config "${CMAKE_CURRENT_BINARY_DIR}/run_test.cmake" @ONLY) add_test( diff --git a/tests/ECMGeneratePkgConfigFile/CMakeLists.txt b/tests/ECMGeneratePkgConfigFile/CMakeLists.txt index f3bc267d..6d6ea4e0 100644 --- a/tests/ECMGeneratePkgConfigFile/CMakeLists.txt +++ b/tests/ECMGeneratePkgConfigFile/CMakeLists.txt @@ -1,4 +1,4 @@ -set(MODULES_DIR "${extra-cmake-modules_SOURCE_DIR}/modules") +set(MODULES_DIR "${ECM_SOURCE_DIR}/modules") configure_file(run_test.cmake.config "${CMAKE_CURRENT_BINARY_DIR}/run_test.cmake" @ONLY) add_test( |