Warning, /pim/akonadi/autotests/server/CMakeLists.txt is written in an unsupported language. File is not indexed.

0001 ########### next target ###############
0002 
0003 # QTEST_MAIN is using QApplication when QT_GUI_LIB is defined
0004 remove_definitions(-DQT_GUI_LIB)
0005 
0006 set(EXECUTABLE_OUTPUT_PATH ${CMAKE_CURRENT_BINARY_DIR})
0007 
0008 akonadi_run_xsltproc(
0009     XSL ${Akonadi_SOURCE_DIR}/src/server/storage/schema.xsl
0010     XML ${CMAKE_CURRENT_SOURCE_DIR}/dbtest_data/unittest_schema.xml
0011     BASENAME unittestschema
0012     CLASSNAME UnitTestSchema
0013 )
0014 akonadi_run_xsltproc(
0015     XSL ${CMAKE_CURRENT_SOURCE_DIR}/dbpopulator.xsl
0016     XML ${CMAKE_CURRENT_SOURCE_DIR}/dbtest_data/dbdata.xml
0017     BASENAME dbpopulator
0018 )
0019 
0020 set_property(SOURCE ${CMAKE_CURRENT_BINARY_DIR}/dbpopulator.cpp PROPERTY SKIP_AUTOMOC TRUE)
0021 
0022 add_library(akonadi_unittest_common STATIC)
0023 target_sources(akonadi_unittest_common PRIVATE
0024     unittestschema.cpp
0025     fakeconnection.cpp
0026     fakeintervalcheck.cpp
0027     fakedatastore.cpp
0028     fakeclient.cpp
0029     fakeakonadiserver.cpp
0030     fakesearchmanager.cpp
0031     fakeitemretrievalmanager.cpp
0032     dbinitializer.cpp
0033     inspectablenotificationcollector.cpp
0034     ${CMAKE_CURRENT_BINARY_DIR}/dbpopulator.cpp
0035     fakeconnection.h
0036     fakeintervalcheck.h
0037     fakedatastore.h
0038     fakeclient.h
0039     fakeakonadiserver.h
0040     fakesearchmanager.h
0041     fakeitemretrievalmanager.h
0042     dbinitializer.h
0043     inspectablenotificationcollector.h
0044 )
0045 
0046 
0047 target_link_libraries(akonadi_unittest_common
0048     KPim6::AkonadiPrivate
0049     libakonadiserver
0050     Qt::Core
0051     Qt::DBus
0052     Qt::Test
0053     Qt::Sql
0054     Qt::Network
0055 )
0056 
0057 macro(add_server_test _source)
0058     set(_test ${_source} ../../src/server/akonadiserver_debug.cpp ../../src/server/akonadiserver_search_debug.cpp dbtest_data/dbtest_data.qrc)
0059     get_filename_component(_name ${_source} NAME_WE)
0060     ecm_add_test(TEST_NAME ${_name} NAME_PREFIX "AkonadiServer-" ${_test})
0061     if (ENABLE_ASAN)
0062         set_tests_properties(AkonadiServer-${_name} PROPERTIES
0063                              ENVIRONMENT ASAN_OPTIONS=symbolize=1
0064         )
0065     endif()
0066     set_tests_properties(AkonadiServer-${_name} PROPERTIES
0067                          ENVIRONMENT "QT_HASH_SEED=0;QT_NO_CPU_FEATURE=sse4.2"
0068     )
0069     target_link_libraries(${_name}
0070         akonadi_shared
0071         akonadi_unittest_common
0072         libakonadiserver
0073         KPim6::AkonadiPrivate
0074         Qt::Core
0075         Qt::DBus
0076         Qt::Test
0077         Qt::Sql
0078         Qt::Network
0079         ${CMAKE_SHARED_LINKER_FLAGS_ASAN}
0080     )
0081 endmacro()
0082 
0083 add_server_test(dbdeadlockcatchertest.cpp)
0084 add_server_test(dbtypetest.cpp)
0085 add_server_test(dbintrospectortest.cpp)
0086 add_server_test(querybuildertest.cpp)
0087 add_server_test(dbinitializertest.cpp dbinitializertest.h)
0088 add_server_test(dbupdatertest.cpp dbupdatertest.h)
0089 add_server_test(handlertest.cpp)
0090 add_server_test(dbconfigtest.cpp)
0091 add_server_test(parthelpertest.cpp)
0092 add_server_test(itemretrievertest.cpp)
0093 add_server_test(notificationsubscribertest.cpp)
0094 add_server_test(notificationmanagertest.cpp)
0095 add_server_test(parttypehelpertest.cpp)
0096 add_server_test(collectionstatisticstest.cpp)
0097 add_server_test(aggregatedfetchscopetest.cpp)
0098 add_server_test(collectionschedulertest.cpp)
0099 add_server_test(partstreamertest.cpp)
0100 add_server_test(itemcreatehandlertest.cpp)
0101 add_server_test(itemlinkhandlertest.cpp)
0102 add_server_test(itemmovehandlertest.cpp)
0103 add_server_test(collectioncreatehandlertest.cpp)
0104 add_server_test(collectionfetchhandlertest.cpp)
0105 add_server_test(collectionmodifyhandlertest.cpp)
0106 add_server_test(searchtest.cpp akonadiprivate)
0107 add_server_test(relationhandlertest.cpp akonadiprivate)
0108 add_server_test(taghandlertest.cpp akonadiprivate)
0109 add_server_test(fetchhandlertest.cpp akonadiprivate)