diff options
author | Sebastian Holtermann <sebholt@xwmw.org> | 2016-09-30 07:53:35 (GMT) |
---|---|---|
committer | Brad King <brad.king@kitware.com> | 2016-09-30 14:02:49 (GMT) |
commit | bcafc399c581974c21631275adc2bba3e0e7d535 (patch) | |
tree | d8dabf14d75fd39e578b9ef846f8ee48fcc57ea8 /Tests/QtAutogen | |
parent | 98b11f252c821e60da6492b2f27a84c68d6f2a2b (diff) | |
download | CMake-bcafc399c581974c21631275adc2bba3e0e7d535.zip CMake-bcafc399c581974c21631275adc2bba3e0e7d535.tar.gz CMake-bcafc399c581974c21631275adc2bba3e0e7d535.tar.bz2 |
QtAutogen: Add test for empty qrc file
Diffstat (limited to 'Tests/QtAutogen')
-rw-r--r-- | Tests/QtAutogen/CMakeLists.txt | 6 | ||||
-rw-r--r-- | Tests/QtAutogen/rcc_empty.cpp | 9 | ||||
-rw-r--r-- | Tests/QtAutogen/rcc_empty_resource.qrc | 4 |
3 files changed, 19 insertions, 0 deletions
diff --git a/Tests/QtAutogen/CMakeLists.txt b/Tests/QtAutogen/CMakeLists.txt index e35e1d1..c713d1c 100644 --- a/Tests/QtAutogen/CMakeLists.txt +++ b/Tests/QtAutogen/CMakeLists.txt @@ -44,10 +44,16 @@ else() endif() +# -- RCC only add_executable(rcconly rcconly.cpp second_resource.qrc) set_property(TARGET rcconly PROPERTY AUTORCC ON) target_link_libraries(rcconly ${QT_QTCORE_TARGET}) +# -- RCC empty +add_executable(rcc_empty rcc_empty.cpp rcc_empty_resource.qrc) +set_property(TARGET rcc_empty PROPERTY AUTORCC ON) +target_link_libraries(rcc_empty ${QT_QTCORE_TARGET}) + include_directories(${CMAKE_CURRENT_BINARY_DIR}) add_definitions(-DFOO -DSomeDefine="Barx") diff --git a/Tests/QtAutogen/rcc_empty.cpp b/Tests/QtAutogen/rcc_empty.cpp new file mode 100644 index 0000000..3f9f9a2 --- /dev/null +++ b/Tests/QtAutogen/rcc_empty.cpp @@ -0,0 +1,9 @@ + +extern int qInitResources_rcc_empty_resource(); + +int main(int, char**) +{ + // Fails to link if the symbol is not present. + qInitResources_rcc_empty_resource(); + return 0; +} diff --git a/Tests/QtAutogen/rcc_empty_resource.qrc b/Tests/QtAutogen/rcc_empty_resource.qrc new file mode 100644 index 0000000..4ca9cd5 --- /dev/null +++ b/Tests/QtAutogen/rcc_empty_resource.qrc @@ -0,0 +1,4 @@ +<!DOCTYPE RCC><RCC version="1.0"> +<qresource> +</qresource> +</RCC> |