diff options
author | Sebastian Holtermann <sebholt@xwmw.org> | 2017-12-08 17:03:20 (GMT) |
---|---|---|
committer | Sebastian Holtermann <sebholt@xwmw.org> | 2017-12-13 12:48:28 (GMT) |
commit | f658bdaa7c7899a46caf402d4114999019897d46 (patch) | |
tree | 8f329910864515efcd551ebe05b532a84e823859 /Tests/QtAutogen | |
parent | f00e6c7c7024a784d2da310ba7b5f4a67e60fdff (diff) | |
download | CMake-f658bdaa7c7899a46caf402d4114999019897d46.zip CMake-f658bdaa7c7899a46caf402d4114999019897d46.tar.gz CMake-f658bdaa7c7899a46caf402d4114999019897d46.tar.bz2 |
Autogen: Tests: Separate RccOffMocLibrary test
Diffstat (limited to 'Tests/QtAutogen')
-rw-r--r-- | Tests/QtAutogen/CMakeLists.txt | 16 | ||||
-rw-r--r-- | Tests/QtAutogen/CommonTests.cmake | 1 | ||||
-rw-r--r-- | Tests/QtAutogen/RccOffMocLibrary/CMakeLists.txt | 17 | ||||
-rw-r--r-- | Tests/QtAutogen/RccOffMocLibrary/empty.cpp (renamed from Tests/QtAutogen/empty.cpp) | 0 | ||||
-rw-r--r-- | Tests/QtAutogen/RccOffMocLibrary/empty.h (renamed from Tests/QtAutogen/empty.h) | 0 | ||||
-rw-r--r-- | Tests/QtAutogen/RccOffMocLibrary/not_generated_file.qrc (renamed from Tests/QtAutogen/not_generated_file.qrc) | 0 |
6 files changed, 18 insertions, 16 deletions
diff --git a/Tests/QtAutogen/CMakeLists.txt b/Tests/QtAutogen/CMakeLists.txt index 9125bd7..723747a 100644 --- a/Tests/QtAutogen/CMakeLists.txt +++ b/Tests/QtAutogen/CMakeLists.txt @@ -60,22 +60,6 @@ if(NON_ASCII_BDIR AND WIN32) endif() # -- Test -# Add not_generated_file.qrc to the source list to get the file-level -# dependency, but don't generate a c++ file from it. Disable the AUTORCC -# feature for this target. This tests that qrc files in the sources don't -# have an effect on generation if AUTORCC is off. -add_library(empty STATIC empty.cpp not_generated_file.qrc) -set_target_properties(empty PROPERTIES AUTORCC OFF) -set_target_properties(empty PROPERTIES AUTOMOC TRUE) -target_link_libraries(empty no_link_language) -add_library(no_link_language STATIC empty.h) -set_target_properties(no_link_language PROPERTIES AUTOMOC TRUE) -# Pass Qt compiler features to targets that don't link against Qt -target_compile_features(no_link_language PRIVATE ${QT_COMPILE_FEATURES}) -target_compile_features(empty PRIVATE ${QT_COMPILE_FEATURES}) - - -# -- Test # Test for SKIP_AUTOMOC and SKIP_AUTOGEN on an AUTOMOC enabled target if(ALLOW_WRAP_CPP) # Generate header mocs manually diff --git a/Tests/QtAutogen/CommonTests.cmake b/Tests/QtAutogen/CommonTests.cmake index 0950062..f998b74 100644 --- a/Tests/QtAutogen/CommonTests.cmake +++ b/Tests/QtAutogen/CommonTests.cmake @@ -6,3 +6,4 @@ if(QT_TEST_ALLOW_QT_MACROS) endif() ADD_AUTOGEN_TEST(RccOnly rccOnly) ADD_AUTOGEN_TEST(RccEmpty rccEmpty) +ADD_AUTOGEN_TEST(RccOffMocLibrary) diff --git a/Tests/QtAutogen/RccOffMocLibrary/CMakeLists.txt b/Tests/QtAutogen/RccOffMocLibrary/CMakeLists.txt new file mode 100644 index 0000000..7f7432e --- /dev/null +++ b/Tests/QtAutogen/RccOffMocLibrary/CMakeLists.txt @@ -0,0 +1,17 @@ +cmake_minimum_required(VERSION 3.10) +project(RccOffMocLibrary) +include("../AutogenTest.cmake") + +# Add not_generated_file.qrc to the source list to get the file-level +# dependency, but don't generate a c++ file from it. Disable the AUTORCC +# feature for this target. This tests that qrc files in the sources don't +# have an effect on generation if AUTORCC is off. +add_library(empty STATIC empty.cpp not_generated_file.qrc) +set_target_properties(empty PROPERTIES AUTORCC OFF) +set_target_properties(empty PROPERTIES AUTOMOC TRUE) +target_link_libraries(empty no_link_language) +add_library(no_link_language STATIC empty.h) +set_target_properties(no_link_language PROPERTIES AUTOMOC TRUE) +# Pass Qt compiler features to targets that don't link against Qt +target_compile_features(no_link_language PRIVATE ${QT_COMPILE_FEATURES}) +target_compile_features(empty PRIVATE ${QT_COMPILE_FEATURES}) diff --git a/Tests/QtAutogen/empty.cpp b/Tests/QtAutogen/RccOffMocLibrary/empty.cpp index ab32cf6..ab32cf6 100644 --- a/Tests/QtAutogen/empty.cpp +++ b/Tests/QtAutogen/RccOffMocLibrary/empty.cpp diff --git a/Tests/QtAutogen/empty.h b/Tests/QtAutogen/RccOffMocLibrary/empty.h index 6bdd2ac..6bdd2ac 100644 --- a/Tests/QtAutogen/empty.h +++ b/Tests/QtAutogen/RccOffMocLibrary/empty.h diff --git a/Tests/QtAutogen/not_generated_file.qrc b/Tests/QtAutogen/RccOffMocLibrary/not_generated_file.qrc index c769834..c769834 100644 --- a/Tests/QtAutogen/not_generated_file.qrc +++ b/Tests/QtAutogen/RccOffMocLibrary/not_generated_file.qrc |