Warning, /frameworks/kitemmodels/autotests/CMakeLists.txt is written in an unsupported language. File is not indexed.

0001 
0002 set(proxyModelSmokeTestSources
0003   kselectionproxymodeltestsuite.cpp
0004 )
0005 
0006 remove_definitions(-DQT_NO_CAST_TO_ASCII)
0007 remove_definitions(-DQT_NO_CAST_FROM_ASCII)
0008 remove_definitions(-DQT_NO_CAST_FROM_BYTEARRAY)
0009 
0010 add_subdirectory(proxymodeltestsuite)
0011 add_subdirectory(bihash)
0012 
0013 include(ECMAddTests)
0014 
0015 ecm_add_tests(
0016     kcolumnheadersmodeltest.cpp
0017     kdescendantsproxymodel_smoketest.cpp
0018     kdescendantsproxymodeltest.cpp
0019     kextracolumnsproxymodeltest.cpp
0020     klinkitemselectionmodeltest.cpp
0021     kmodelindexproxymappertest.cpp
0022     knumbermodeltest.cpp
0023     krearrangecolumnsproxymodeltest.cpp
0024     kselectionproxymodeltest.cpp
0025 
0026     LINK_LIBRARIES
0027         KF6::ItemModels
0028         Qt6::Test
0029         Qt6::Widgets
0030         proxymodeltestsuite
0031 )
0032 
0033 macro(kitemmodels_add_tests)
0034     ecm_add_tests(${ARGV}
0035         TARGET_NAMES_VAR _target_names
0036         LINK_LIBRARIES
0037             Qt6::Gui
0038             Qt6::Test
0039             Qt6::Qml
0040     )
0041     # In case of static builds, we need to link against and import the QML plugin
0042     if (NOT BUILD_SHARED_LIBS)
0043         foreach(_target ${_target_names})
0044             target_link_libraries(${_target} itemmodelsplugin)
0045             target_compile_definitions(${_target} PRIVATE -DIMPORT_ITEMMODELSPLUGIN)
0046         endforeach()
0047     endif()
0048 endmacro()
0049 
0050 if (TARGET Qt6::Qml)
0051     kitemmodels_add_tests(
0052         krolenames_qml.cpp
0053         ksortfilterproxymodel_qml.cpp
0054     )
0055 endif()
0056 
0057 # we need additional sources for this test, can't use it in ecm_add_tests
0058 ecm_add_test(kselectionproxymodel_smoketest.cpp ${proxyModelSmokeTestSources}
0059     TEST_NAME "kselectionproxymodel_smoketest"
0060     LINK_LIBRARIES
0061         KF6::ItemModels
0062         Qt6::Test
0063         Qt6::Widgets
0064         proxymodeltestsuite
0065 )