diff options
author | Brad King <brad.king@kitware.com> | 2016-10-01 12:20:33 (GMT) |
---|---|---|
committer | CMake Topic Stage <kwrobot@kitware.com> | 2016-10-01 12:20:33 (GMT) |
commit | 8202816a36ec010b13ac212ca2efdf958828fb84 (patch) | |
tree | 353f53bf0628eaaa579cea41a1b11906ed3b4553 /Tests | |
parent | de486a68950677512f33ce832e80ab334b501a61 (diff) | |
parent | bcafc399c581974c21631275adc2bba3e0e7d535 (diff) | |
download | CMake-8202816a36ec010b13ac212ca2efdf958828fb84.zip CMake-8202816a36ec010b13ac212ca2efdf958828fb84.tar.gz CMake-8202816a36ec010b13ac212ca2efdf958828fb84.tar.bz2 |
Merge topic 'autogen-empty-qrc'
bcafc399 QtAutogen: Add test for empty qrc file
98b11f25 QtAutogen: Allow .qrc files that do not contain any file reference
Diffstat (limited to 'Tests')
-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> |