summaryrefslogtreecommitdiffstats
path: root/Tests/QtAutogen/RccEmpty
diff options
context:
space:
mode:
authorSebastian Holtermann <sebholt@xwmw.org>2017-12-08 16:46:58 (GMT)
committerSebastian Holtermann <sebholt@xwmw.org>2017-12-13 12:48:28 (GMT)
commitf00e6c7c7024a784d2da310ba7b5f4a67e60fdff (patch)
treed31c5506aa954e5a2e2f2a0282dd2842522cd4a4 /Tests/QtAutogen/RccEmpty
parent6273b8354902e1af124d6f9b4a0ba23cf5e8a9b9 (diff)
downloadCMake-f00e6c7c7024a784d2da310ba7b5f4a67e60fdff.zip
CMake-f00e6c7c7024a784d2da310ba7b5f4a67e60fdff.tar.gz
CMake-f00e6c7c7024a784d2da310ba7b5f4a67e60fdff.tar.bz2
Autogen: Tests: Separate RccOnly and RccEmpty tests
Diffstat (limited to 'Tests/QtAutogen/RccEmpty')
-rw-r--r--Tests/QtAutogen/RccEmpty/CMakeLists.txt8
-rw-r--r--Tests/QtAutogen/RccEmpty/rccEmpty.cpp9
-rw-r--r--Tests/QtAutogen/RccEmpty/rccEmptyRes.qrc4
3 files changed, 21 insertions, 0 deletions
diff --git a/Tests/QtAutogen/RccEmpty/CMakeLists.txt b/Tests/QtAutogen/RccEmpty/CMakeLists.txt
new file mode 100644
index 0000000..3b16edc
--- /dev/null
+++ b/Tests/QtAutogen/RccEmpty/CMakeLists.txt
@@ -0,0 +1,8 @@
+cmake_minimum_required(VERSION 3.10)
+project(RccEmpty)
+include("../AutogenTest.cmake")
+
+# Test AUTORCC on a .qrc file with no resource files
+add_executable(rccEmpty rccEmpty.cpp rccEmptyRes.qrc)
+set_property(TARGET rccEmpty PROPERTY AUTORCC ON)
+target_link_libraries(rccEmpty ${QT_QTCORE_TARGET})
diff --git a/Tests/QtAutogen/RccEmpty/rccEmpty.cpp b/Tests/QtAutogen/RccEmpty/rccEmpty.cpp
new file mode 100644
index 0000000..7f2c527
--- /dev/null
+++ b/Tests/QtAutogen/RccEmpty/rccEmpty.cpp
@@ -0,0 +1,9 @@
+
+extern int qInitResources_rccEmptyRes();
+
+int main(int, char**)
+{
+ // Fails to link if the symbol is not present.
+ qInitResources_rccEmptyRes();
+ return 0;
+}
diff --git a/Tests/QtAutogen/RccEmpty/rccEmptyRes.qrc b/Tests/QtAutogen/RccEmpty/rccEmptyRes.qrc
new file mode 100644
index 0000000..4ca9cd5
--- /dev/null
+++ b/Tests/QtAutogen/RccEmpty/rccEmptyRes.qrc
@@ -0,0 +1,4 @@
+<!DOCTYPE RCC><RCC version="1.0">
+<qresource>
+</qresource>
+</RCC>