Browse Source

Autogen: Tests: Separate RccOffMocLibrary test

Sebastian Holtermann 8 years ago
parent
commit
f658bdaa7c

+ 0 - 16
Tests/QtAutogen/CMakeLists.txt

@@ -59,22 +59,6 @@ if(NON_ASCII_BDIR AND WIN32)
   set(ALLOW_WRAP_CPP FALSE)
 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)

+ 1 - 0
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)

+ 17 - 0
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})

+ 0 - 0
Tests/QtAutogen/empty.cpp → Tests/QtAutogen/RccOffMocLibrary/empty.cpp


+ 0 - 0
Tests/QtAutogen/empty.h → Tests/QtAutogen/RccOffMocLibrary/empty.h


+ 0 - 0
Tests/QtAutogen/not_generated_file.qrc → Tests/QtAutogen/RccOffMocLibrary/not_generated_file.qrc