summaryrefslogtreecommitdiffstats
path: root/Tests/QtAutogen/RccSkipSource
diff options
context:
space:
mode:
authorSebastian Holtermann <sebholt@xwmw.org>2017-12-08 17:55:43 (GMT)
committerSebastian Holtermann <sebholt@xwmw.org>2017-12-13 12:48:28 (GMT)
commit5cab8c307c7df585152e3ab9e007574cb0e690dc (patch)
tree97b13703ece45f36bf3d3f20d89b65a99124683c /Tests/QtAutogen/RccSkipSource
parentf11321efd11ce4958d45f4673465b5b9484f1af2 (diff)
downloadCMake-5cab8c307c7df585152e3ab9e007574cb0e690dc.zip
CMake-5cab8c307c7df585152e3ab9e007574cb0e690dc.tar.gz
CMake-5cab8c307c7df585152e3ab9e007574cb0e690dc.tar.bz2
Autogen: Tests: Separate RccSkipSource test
Diffstat (limited to 'Tests/QtAutogen/RccSkipSource')
-rw-r--r--Tests/QtAutogen/RccSkipSource/CMakeLists.txt23
-rw-r--r--Tests/QtAutogen/RccSkipSource/skipRcc.cpp9
-rw-r--r--Tests/QtAutogen/RccSkipSource/skipRccBad1.qrc5
-rw-r--r--Tests/QtAutogen/RccSkipSource/skipRccBad2.qrc5
-rw-r--r--Tests/QtAutogen/RccSkipSource/skipRccGood.qrc6
5 files changed, 48 insertions, 0 deletions
diff --git a/Tests/QtAutogen/RccSkipSource/CMakeLists.txt b/Tests/QtAutogen/RccSkipSource/CMakeLists.txt
new file mode 100644
index 0000000..f8a8032
--- /dev/null
+++ b/Tests/QtAutogen/RccSkipSource/CMakeLists.txt
@@ -0,0 +1,23 @@
+cmake_minimum_required(VERSION 3.10)
+project(RccSkipSource)
+include("../AutogenTest.cmake")
+
+# Test for SKIP_AUTORCC and SKIP_AUTOGEN on an AUTORCC enabled target
+set(skipRccSources
+ skipRcc.cpp
+ skipRccBad1.qrc
+ skipRccBad2.qrc
+ skipRccGood.qrc
+)
+set_property(SOURCE skipRccBad1.qrc PROPERTY SKIP_AUTORCC ON)
+set_property(SOURCE skipRccBad2.qrc PROPERTY SKIP_AUTOGEN ON)
+# AUTORCC enabled
+add_executable(skipRccA ${skipRccSources})
+set_property(TARGET skipRccA PROPERTY AUTORCC ON)
+target_link_libraries(skipRccA ${QT_LIBRARIES})
+# AUTORCC, AUTOUIC and AUTOMOC enabled
+add_executable(skipRccB ${skipRccSources})
+set_property(TARGET skipRccB PROPERTY AUTORCC ON)
+set_property(TARGET skipRccB PROPERTY AUTOUIC ON)
+set_property(TARGET skipRccB PROPERTY AUTOMOC ON)
+target_link_libraries(skipRccB ${QT_LIBRARIES})
diff --git a/Tests/QtAutogen/RccSkipSource/skipRcc.cpp b/Tests/QtAutogen/RccSkipSource/skipRcc.cpp
new file mode 100644
index 0000000..ec57110
--- /dev/null
+++ b/Tests/QtAutogen/RccSkipSource/skipRcc.cpp
@@ -0,0 +1,9 @@
+
+extern int qInitResources_skipRccGood();
+
+int main(int, char**)
+{
+ // Fails to link if the symbol is not present.
+ qInitResources_skipRccGood();
+ return 0;
+}
diff --git a/Tests/QtAutogen/RccSkipSource/skipRccBad1.qrc b/Tests/QtAutogen/RccSkipSource/skipRccBad1.qrc
new file mode 100644
index 0000000..6cbd9ed
--- /dev/null
+++ b/Tests/QtAutogen/RccSkipSource/skipRccBad1.qrc
@@ -0,0 +1,5 @@
+<!DOCTYPE RCC><RCC version="1.0">
+<qresource>
+ <file>skipRccGood.cpp</file>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>
+</qresource>
+</RCC>
diff --git a/Tests/QtAutogen/RccSkipSource/skipRccBad2.qrc b/Tests/QtAutogen/RccSkipSource/skipRccBad2.qrc
new file mode 100644
index 0000000..b32c589
--- /dev/null
+++ b/Tests/QtAutogen/RccSkipSource/skipRccBad2.qrc
@@ -0,0 +1,5 @@
+<!DOCTYPE RCC><RCC version="1.0">>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>><
+<qresource>
+ <file>skipRccGood.cpp</file>
+</qresource>
+</RCC>
diff --git a/Tests/QtAutogen/RccSkipSource/skipRccGood.qrc b/Tests/QtAutogen/RccSkipSource/skipRccGood.qrc
new file mode 100644
index 0000000..21a94b0
--- /dev/null
+++ b/Tests/QtAutogen/RccSkipSource/skipRccGood.qrc
@@ -0,0 +1,6 @@
+<!DOCTYPE RCC><RCC version="1.0">
+<qresource>
+ <file>skipRccBad1.qrc</file>
+ <file>skipRccBad2.qrc</file>
+</qresource>
+</RCC>