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

0001 include(ECMAddTests)
0002 
0003 find_package(Qt6Test CONFIG REQUIRED)
0004 
0005 set(kgapitest_SRCS
0006     fakeaccountstorage.cpp
0007     fakeauthbrowser.cpp
0008     fakenetworkreply.cpp
0009     fakenetworkaccessmanager.cpp
0010     fakenetworkaccessmanagerfactory.cpp
0011     testutils.cpp
0012     fakeaccountstorage.h
0013     fakeauthbrowser.h
0014     fakenetworkreply.h
0015     fakenetworkaccessmanager.h
0016     fakenetworkaccessmanagerfactory.h
0017     testutils.h
0018 )
0019 
0020 
0021 if (NOT WIN32)
0022 # Silence deprecation warnings for deprecated APIs tests.
0023 set_source_files_properties(
0024     drive/teamdrivecreatejobtest.cpp
0025     drive/teamdrivedeletejobtest.cpp
0026     drive/teamdrivefetchjobtest.cpp
0027     drive/teamdrivemodifyjobtest.cpp
0028     drive/drivetestutils.h
0029 
0030     PROPERTIES COMPILE_FLAGS -Wno-deprecated-declarations
0031 )
0032 endif()
0033 
0034 add_library(kgapitest STATIC ${kgapitest_SRCS})
0035 if (COMPILE_WITH_UNITY_CMAKE_SUPPORT)
0036     set_target_properties(kgapitest PROPERTIES UNITY_BUILD ON)
0037 endif()
0038 
0039 target_link_libraries(kgapitest Qt::Core Qt::Network Qt::Gui Qt::Test KPim6GAPICore)
0040 
0041 
0042 
0043 macro(add_libkgapi2_test _module _testname)
0044     set(_extraLibs ${ARGN})
0045     set(testSources ${_module}/${_testname}.cpp)
0046     string(SUBSTRING ${_module} 0 1 moduleFirst)
0047     string(SUBSTRING ${_module} 1 -1 moduleLast)
0048     string(TOUPPER ${moduleFirst} moduleFirst)
0049     string(CONCAT moduleName ${moduleFirst} ${moduleLast})
0050     set(extraLibs "${_extraLibs};KPim6GAPI${moduleName}")
0051     set(utilsFile ${CMAKE_CURRENT_SOURCE_DIR}/${_module}/${_module}testutils.cpp)
0052     if (EXISTS ${utilsFile})
0053         list(APPEND testSources ${utilsFile})
0054     endif()
0055     ecm_add_test(${testSources}
0056         LINK_LIBRARIES kgapitest KPim6GAPICore ${extraLibs}
0057         TEST_NAME ${_testname}
0058         NAME_PREFIX ${_module}-
0059     )
0060 endmacro(add_libkgapi2_test)
0061 
0062 ecm_add_test(fakenamtest.cpp LINK_LIBRARIES kgapitest KPim6GAPICore TEST_NAME fakenamtest NAME_PREFIX fake-)
0063 
0064 add_libkgapi2_test(core accountinfofetchjobtest)
0065 add_libkgapi2_test(core accountmanagertest)
0066 add_libkgapi2_test(core createjobtest)
0067 add_libkgapi2_test(core fetchjobtest)
0068 
0069 add_libkgapi2_test(calendar calendarcreatejobtest)
0070 add_libkgapi2_test(calendar calendardeletejobtest)
0071 add_libkgapi2_test(calendar calendarfetchjobtest)
0072 add_libkgapi2_test(calendar calendarmodifyjobtest)
0073 add_libkgapi2_test(calendar eventcreatejobtest)
0074 add_libkgapi2_test(calendar eventdeletejobtest)
0075 add_libkgapi2_test(calendar eventfetchjobtest)
0076 add_libkgapi2_test(calendar eventmodifyjobtest)
0077 add_libkgapi2_test(calendar freebusyqueryjobtest)
0078 
0079 add_libkgapi2_test(tasks taskcreatejobtest)
0080 add_libkgapi2_test(tasks taskdeletejobtest)
0081 add_libkgapi2_test(tasks taskfetchjobtest)
0082 add_libkgapi2_test(tasks taskmodifyjobtest)
0083 add_libkgapi2_test(tasks taskmovejobtest)
0084 add_libkgapi2_test(tasks tasklistcreatejobtest)
0085 add_libkgapi2_test(tasks tasklistdeletejobtest)
0086 add_libkgapi2_test(tasks tasklistfetchjobtest)
0087 add_libkgapi2_test(tasks tasklistmodifyjobtest)
0088 
0089 add_libkgapi2_test(drive aboutfetchjobtest)
0090 add_libkgapi2_test(drive changefetchjobtest)
0091 add_libkgapi2_test(drive filecopyjobtest Qt::Gui)
0092 add_libkgapi2_test(drive filecreatejobtest Qt::Gui)
0093 add_libkgapi2_test(drive filesearchquerytest)
0094 add_libkgapi2_test(drive drivescreatejobtest)
0095 add_libkgapi2_test(drive drivesdeletejobtest)
0096 add_libkgapi2_test(drive drivesmodifyjobtest)
0097 add_libkgapi2_test(drive driveshidejobtest)
0098 add_libkgapi2_test(drive drivesfetchjobtest)
0099 add_libkgapi2_test(drive drivessearchquerytest)
0100 add_libkgapi2_test(drive teamdrivecreatejobtest)
0101 add_libkgapi2_test(drive teamdrivedeletejobtest)
0102 add_libkgapi2_test(drive teamdrivemodifyjobtest)
0103 add_libkgapi2_test(drive teamdrivefetchjobtest)
0104 add_libkgapi2_test(drive teamdrivesearchquerytest)
0105 
0106 add_libkgapi2_test(people contactgroupcreatejobtest)
0107 add_libkgapi2_test(people contactgroupdeletejobtest)
0108 add_libkgapi2_test(people contactgroupfetchjobtest)
0109 add_libkgapi2_test(people contactgroupmodifyjobtest)
0110 add_libkgapi2_test(people personcreatejobtest)
0111 add_libkgapi2_test(people persondeletejobtest)
0112 add_libkgapi2_test(people personfetchjobtest)
0113 add_libkgapi2_test(people personmodifyjobtest)
0114 add_libkgapi2_test(people personphotoupdatejobtest)
0115 add_libkgapi2_test(people personphotodeletejobtest)