aboutsummaryrefslogtreecommitdiffstats
path: root/tests
diff options
context:
space:
mode:
authorStephen Kelly <stephen.kelly@kdab.com>2013-09-04 13:47:47 +0200
committerThe Qt Project <gerrit-noreply@qt-project.org>2013-09-04 15:16:25 +0200
commit2a3ccc0574574f5572fa356855dc34d1fbb3c5a9 (patch)
treee0c8f0149b48d966bfffdaae1751c31a810caf02 /tests
parent7b6e8623056840155b7d5530b161ed93f7b14aa0 (diff)
Add CMake test.
Change-Id: If0b1b999466740661f158ab649462fae51800554 Reviewed-by: Jake Petroules <jake.petroules@petroules.com> Reviewed-by: Stephen Kelly <stephen.kelly@kdab.com>
Diffstat (limited to 'tests')
-rw-r--r--tests/auto/auto.pro3
-rw-r--r--tests/auto/cmake/CMakeLists.txt12
-rw-r--r--tests/auto/cmake/cmake.pro6
-rw-r--r--tests/auto/cmake/test_modules/CMakeLists.txt13
-rw-r--r--tests/auto/cmake/test_modules/main.mm50
5 files changed, 83 insertions, 1 deletions
diff --git a/tests/auto/auto.pro b/tests/auto/auto.pro
index 998e36a..d484259 100644
--- a/tests/auto/auto.pro
+++ b/tests/auto/auto.pro
@@ -1,2 +1,3 @@
TEMPLATE = subdirs
-SUBDIRS = macfunctions
+SUBDIRS = macfunctions \
+ cmake
diff --git a/tests/auto/cmake/CMakeLists.txt b/tests/auto/cmake/CMakeLists.txt
new file mode 100644
index 0000000..4f15a69
--- /dev/null
+++ b/tests/auto/cmake/CMakeLists.txt
@@ -0,0 +1,12 @@
+
+cmake_minimum_required(VERSION 2.8)
+
+project(qmake_cmake_files)
+
+enable_testing()
+
+find_package(Qt5Core REQUIRED)
+
+include("${_Qt5CTestMacros}")
+
+expect_pass(test_modules)
diff --git a/tests/auto/cmake/cmake.pro b/tests/auto/cmake/cmake.pro
new file mode 100644
index 0000000..3210a24
--- /dev/null
+++ b/tests/auto/cmake/cmake.pro
@@ -0,0 +1,6 @@
+
+TEMPLATE = subdirs
+
+CMAKE_QT_MODULES_UNDER_TEST = macextras
+
+CONFIG += ctest_testcase
diff --git a/tests/auto/cmake/test_modules/CMakeLists.txt b/tests/auto/cmake/test_modules/CMakeLists.txt
new file mode 100644
index 0000000..e16bea8
--- /dev/null
+++ b/tests/auto/cmake/test_modules/CMakeLists.txt
@@ -0,0 +1,13 @@
+
+cmake_minimum_required(VERSION 2.8)
+
+project(test_modules)
+
+find_package(Qt5MacExtras 5.0.0 REQUIRED)
+include_directories(${Qt5MacExtras_INCLUDE_DIRS})
+add_definitions(${Qt5MacExtras_DEFINITIONS})
+
+set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} ${Qt5Core_EXECUTABLE_COMPILE_FLAGS}")
+
+add_executable(module_includes_exe "${CMAKE_CURRENT_SOURCE_DIR}/main.mm")
+target_link_libraries(module_includes_exe Qt5::MacExtras)
diff --git a/tests/auto/cmake/test_modules/main.mm b/tests/auto/cmake/test_modules/main.mm
new file mode 100644
index 0000000..9ace739
--- /dev/null
+++ b/tests/auto/cmake/test_modules/main.mm
@@ -0,0 +1,50 @@
+/****************************************************************************
+**
+** Copyright (C) 2013 Klarälvdalens Datakonsult AB, a KDAB Group company, info@kdab.com, author Stephen Kelly <stephen.kelly@kdab.com>
+** Contact: http://www.qt-project.org/legal
+**
+** This file is part of the test suite of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** Commercial License Usage
+** Licensees holding valid commercial Qt licenses may use this file in
+** accordance with the commercial license agreement provided with the
+** Software or, alternatively, in accordance with the terms contained in
+** a written agreement between you and Digia. For licensing terms and
+** conditions see http://qt.digia.com/licensing. For further information
+** use the contact form at http://qt.digia.com/contact-us.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Digia gives you certain additional
+** rights. These rights are described in the Digia Qt LGPL Exception
+** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 3.0 as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU General Public License version 3.0 requirements will be
+** met: http://www.gnu.org/copyleft/gpl.html.
+**
+**
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+#include <QMacNativeToolBar>
+#include <QtMacExtras/QMacNativeToolBar>
+#include <QtMacExtras>
+#include <QtMacExtras/QtMacExtras>
+
+int main(int, char **) {
+ QMacNativeToolBar localQMacNativeToolBar;
+ return 0;
+}