From c17e0a3ad58f06fcb0827910af520405670b3d51 Mon Sep 17 00:00:00 2001 From: Sebastian Holtermann Date: Sun, 1 Jan 2017 16:45:40 +0100 Subject: AUTOGEN: Tests: AUTORCC SKIP_AUTORCC and SKIP_AUTOGEN test --- Tests/QtAutogen/CMakeLists.txt | 21 +++++++++++++++++++++ Tests/QtAutogen/skipRcc.cpp | 9 +++++++++ Tests/QtAutogen/skipSource/skipRccBad1.qrc | 5 +++++ Tests/QtAutogen/skipSource/skipRccBad2.qrc | 5 +++++ Tests/QtAutogen/skipSource/skipRccGood.qrc | 6 ++++++ 5 files changed, 46 insertions(+) create mode 100644 Tests/QtAutogen/skipRcc.cpp create mode 100644 Tests/QtAutogen/skipSource/skipRccBad1.qrc create mode 100644 Tests/QtAutogen/skipSource/skipRccBad2.qrc create mode 100644 Tests/QtAutogen/skipSource/skipRccGood.qrc diff --git a/Tests/QtAutogen/CMakeLists.txt b/Tests/QtAutogen/CMakeLists.txt index 045f5b9..4b90ad8 100644 --- a/Tests/QtAutogen/CMakeLists.txt +++ b/Tests/QtAutogen/CMakeLists.txt @@ -181,6 +181,27 @@ set_property(TARGET skipUicB PROPERTY AUTOUIC ON) set_property(TARGET skipUicB PROPERTY AUTOMOC ON) target_link_libraries(skipUicB ${QT_LIBRARIES}) +# -- Test: AUTORCC, SKIP_AUTORCC +# Test for SKIP_AUTORCC and SKIP_AUTOGEN on an AUTORCC enabled target +set(skipRccSources + skipRcc.cpp + skipSource/skipRccBad1.qrc + skipSource/skipRccBad2.qrc + skipSource/skipRccGood.qrc +) +set_property(SOURCE skipSource/skipRccBad1.qrc PROPERTY SKIP_AUTORCC ON) +set_property(SOURCE skipSource/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}) + # -- Test: AUTOMOC AUTORCC # Source files with the same basename in different subdirectories add_subdirectory(sameName) diff --git a/Tests/QtAutogen/skipRcc.cpp b/Tests/QtAutogen/skipRcc.cpp new file mode 100644 index 0000000..ec57110 --- /dev/null +++ b/Tests/QtAutogen/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/skipSource/skipRccBad1.qrc b/Tests/QtAutogen/skipSource/skipRccBad1.qrc new file mode 100644 index 0000000..6cbd9ed --- /dev/null +++ b/Tests/QtAutogen/skipSource/skipRccBad1.qrc @@ -0,0 +1,5 @@ + + + skipRccGood.cpp>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>> + + diff --git a/Tests/QtAutogen/skipSource/skipRccBad2.qrc b/Tests/QtAutogen/skipSource/skipRccBad2.qrc new file mode 100644 index 0000000..b32c589 --- /dev/null +++ b/Tests/QtAutogen/skipSource/skipRccBad2.qrc @@ -0,0 +1,5 @@ +>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>< + + skipRccGood.cpp + + diff --git a/Tests/QtAutogen/skipSource/skipRccGood.qrc b/Tests/QtAutogen/skipSource/skipRccGood.qrc new file mode 100644 index 0000000..21a94b0 --- /dev/null +++ b/Tests/QtAutogen/skipSource/skipRccGood.qrc @@ -0,0 +1,6 @@ + + + skipRccBad1.qrc + skipRccBad2.qrc + + -- cgit v0.12