2017-12-14 19:54:31 +03:00
|
|
|
find_package(SQLite3 3.8.0 REQUIRED)
|
2017-12-14 17:10:33 +03:00
|
|
|
include_directories(${CMAKE_SOURCE_DIR}/src
|
2017-08-14 20:19:52 +03:00
|
|
|
${CMAKE_SOURCE_DIR}/src/3rdparty/qtokenizer
|
|
|
|
${CMAKE_SOURCE_DIR}/src/csync
|
|
|
|
${CMAKE_SOURCE_DIR}/src/csync/std
|
|
|
|
${CMAKE_SOURCE_DIR}/src/gui
|
|
|
|
${CMAKE_SOURCE_DIR}/src/libsync
|
|
|
|
${CMAKE_BINARY_DIR}/src/csync
|
|
|
|
${CMAKE_BINARY_DIR}/src/libsync
|
|
|
|
${CMAKE_CURRENT_SOURCE_DIR}
|
|
|
|
${CMAKE_CURRENT_BINARY_DIR}
|
2017-12-14 19:54:31 +03:00
|
|
|
${SQLITE3_INCLUDE_DIR}
|
2017-08-14 20:19:52 +03:00
|
|
|
)
|
|
|
|
|
2018-10-12 15:52:18 +03:00
|
|
|
include(nextcloud_add_test.cmake)
|
2011-03-18 03:14:45 +03:00
|
|
|
|
2018-10-12 15:52:18 +03:00
|
|
|
nextcloud_add_test(NextcloudPropagator "")
|
2020-03-11 00:10:45 +03:00
|
|
|
|
|
|
|
IF(BUILD_UPDATER)
|
|
|
|
nextcloud_add_test(Updater "")
|
|
|
|
endif()
|
2014-01-23 16:20:01 +04:00
|
|
|
|
2014-08-27 11:15:31 +04:00
|
|
|
SET(FolderWatcher_SRC ../src/gui/folderwatcher.cpp)
|
2014-07-07 18:30:32 +04:00
|
|
|
|
|
|
|
IF( NOT WIN32 AND NOT APPLE )
|
2014-08-27 11:15:31 +04:00
|
|
|
list(APPEND FolderWatcher_SRC ../src/gui/folderwatcher_linux.cpp)
|
2014-07-07 18:30:32 +04:00
|
|
|
ENDIF()
|
|
|
|
IF( WIN32 )
|
2014-08-27 11:15:31 +04:00
|
|
|
list(APPEND FolderWatcher_SRC ../src/gui/folderwatcher_win.cpp)
|
2014-07-07 18:30:32 +04:00
|
|
|
ENDIF()
|
|
|
|
IF( APPLE )
|
2014-08-27 11:15:31 +04:00
|
|
|
list(APPEND FolderWatcher_SRC ../src/gui/folderwatcher_mac.cpp)
|
2015-07-28 16:18:43 +03:00
|
|
|
list(APPEND FolderWatcher_SRC ../src/gui/socketapisocket_mac.mm)
|
2014-07-07 18:30:32 +04:00
|
|
|
ENDIF()
|
2018-10-12 15:52:18 +03:00
|
|
|
nextcloud_add_test(NetrcParser ../src/cmd/netrcparser.cpp)
|
|
|
|
nextcloud_add_test(OwnSql "")
|
|
|
|
nextcloud_add_test(SyncJournalDB "")
|
|
|
|
nextcloud_add_test(SyncFileItem "")
|
|
|
|
nextcloud_add_test(ConcatUrl "")
|
|
|
|
nextcloud_add_test(XmlParse "")
|
|
|
|
nextcloud_add_test(ChecksumValidator "")
|
2014-07-07 18:30:32 +04:00
|
|
|
|
2018-10-12 15:52:18 +03:00
|
|
|
nextcloud_add_test(ExcludedFiles "")
|
2017-04-13 14:02:00 +03:00
|
|
|
|
2018-10-12 15:52:18 +03:00
|
|
|
nextcloud_add_test(FileSystem "")
|
|
|
|
nextcloud_add_test(Utility "")
|
|
|
|
nextcloud_add_test(SyncEngine "syncenginetestutils.h")
|
|
|
|
nextcloud_add_test(SyncMove "syncenginetestutils.h")
|
|
|
|
nextcloud_add_test(SyncConflict "syncenginetestutils.h")
|
|
|
|
nextcloud_add_test(SyncFileStatusTracker "syncenginetestutils.h")
|
|
|
|
nextcloud_add_test(ChunkingNg "syncenginetestutils.h")
|
|
|
|
nextcloud_add_test(UploadReset "syncenginetestutils.h")
|
|
|
|
nextcloud_add_test(AllFilesDeleted "syncenginetestutils.h")
|
|
|
|
nextcloud_add_test(Blacklist "syncenginetestutils.h")
|
|
|
|
nextcloud_add_test(FolderWatcher "${FolderWatcher_SRC}")
|
2017-04-13 14:02:00 +03:00
|
|
|
|
|
|
|
if( UNIX AND NOT APPLE )
|
2018-10-12 15:52:18 +03:00
|
|
|
nextcloud_add_test(InotifyWatcher "${FolderWatcher_SRC}")
|
2017-04-13 14:02:00 +03:00
|
|
|
endif(UNIX AND NOT APPLE)
|
|
|
|
|
2018-10-12 15:52:18 +03:00
|
|
|
nextcloud_add_benchmark(LargeSync "syncenginetestutils.h")
|
2015-07-13 15:35:19 +03:00
|
|
|
|
|
|
|
SET(FolderMan_SRC ../src/gui/folderman.cpp)
|
|
|
|
list(APPEND FolderMan_SRC ../src/gui/folder.cpp )
|
|
|
|
list(APPEND FolderMan_SRC ../src/gui/socketapi.cpp )
|
|
|
|
list(APPEND FolderMan_SRC ../src/gui/syncrunfilelog.cpp )
|
2016-04-29 17:14:18 +03:00
|
|
|
list(APPEND FolderMan_SRC ../src/gui/lockwatcher.cpp )
|
2017-05-10 10:37:10 +03:00
|
|
|
list(APPEND FolderMan_SRC ../src/gui/guiutility.cpp )
|
2017-10-04 14:49:42 +03:00
|
|
|
list(APPEND FolderMan_SRC ../src/gui/navigationpanehelper.cpp )
|
2020-02-14 05:12:37 +03:00
|
|
|
list(APPEND FolderMan_SRC ../src/gui/userinfo.cpp )
|
2018-02-21 17:03:55 +03:00
|
|
|
list(APPEND FolderMan_SRC ../src/gui/connectionvalidator.cpp )
|
2020-01-16 12:53:43 +03:00
|
|
|
list(APPEND FolderMan_SRC ../src/gui/ocsjob.cpp )
|
|
|
|
list(APPEND FolderMan_SRC ../src/gui/ocsnavigationappsjob.cpp )
|
2019-07-24 14:56:21 +03:00
|
|
|
list(APPEND FolderMan_SRC ../src/gui/accountstate.cpp )
|
|
|
|
list(APPEND FolderMan_SRC ../src/gui/remotewipe.cpp )
|
2015-07-13 15:35:19 +03:00
|
|
|
list(APPEND FolderMan_SRC ${FolderWatcher_SRC})
|
2019-07-24 14:56:21 +03:00
|
|
|
list(APPEND FolderMan_SRC stubfolderman.cpp )
|
2018-10-12 15:52:18 +03:00
|
|
|
nextcloud_add_test(FolderMan "${FolderMan_SRC}")
|
2015-07-13 15:35:19 +03:00
|
|
|
|
2019-07-24 14:56:21 +03:00
|
|
|
SET(RemoteWipe_SRC ../src/gui/remotewipe.cpp)
|
|
|
|
list(APPEND RemoteWipe_SRC ../src/gui/guiutility.cpp )
|
2020-02-14 05:12:37 +03:00
|
|
|
list(APPEND RemoteWipe_SRC ../src/gui/userinfo.cpp )
|
2019-07-24 14:56:21 +03:00
|
|
|
list(APPEND RemoteWipe_SRC ../src/gui/connectionvalidator.cpp )
|
2020-01-16 12:53:43 +03:00
|
|
|
list(APPEND RemoteWipe_SRC ../src/gui/ocsjob.cpp )
|
|
|
|
list(APPEND RemoteWipe_SRC ../src/gui/ocsnavigationappsjob.cpp )
|
2019-07-24 14:56:21 +03:00
|
|
|
list(APPEND RemoteWipe_SRC ../src/gui/accountstate.cpp )
|
|
|
|
list(APPEND RemoteWipe_SRC ../src/gui/socketapi.cpp )
|
|
|
|
list(APPEND RemoteWipe_SRC ../src/gui/folder.cpp )
|
|
|
|
list(APPEND RemoteWipe_SRC ../src/gui/syncrunfilelog.cpp )
|
2020-01-16 12:39:56 +03:00
|
|
|
list(APPEND RemoteWipe_SRC ${FolderWatcher_SRC} )
|
2019-07-24 14:56:21 +03:00
|
|
|
list(APPEND RemoteWipe_SRC ../src/gui/folderwatcher.cpp )
|
|
|
|
list(APPEND RemoteWipe_SRC ${RemoteWipe_SRC})
|
|
|
|
list(APPEND RemoteWipe_SRC stubremotewipe.cpp )
|
|
|
|
nextcloud_add_test(RemoteWipe "${RemoteWipe_SRC}")
|
|
|
|
|
2018-10-12 15:52:18 +03:00
|
|
|
nextcloud_add_test(OAuth "syncenginetestutils.h;../src/gui/creds/oauth.cpp")
|
2017-09-25 19:23:39 +03:00
|
|
|
|
2017-06-22 16:11:27 +03:00
|
|
|
configure_file(test_journal.db "${PROJECT_BINARY_DIR}/bin/test_journal.db" COPYONLY)
|
2017-08-14 19:49:44 +03:00
|
|
|
|
|
|
|
find_package(CMocka)
|
|
|
|
if (CMOCKA_FOUND)
|
|
|
|
include(AddCMockaTest)
|
|
|
|
add_subdirectory(csync)
|
|
|
|
endif (CMOCKA_FOUND)
|