mirror of
https://github.com/rspamd/rspamd.git
synced 2024-09-08 21:55:58 +02:00
37 lines
1.3 KiB
CMake
37 lines
1.3 KiB
CMake
SET(TESTSRC rspamd_expression_test.c
|
|
rspamd_memcached_test.c
|
|
rspamd_mem_pool_test.c
|
|
rspamd_statfile_test.c
|
|
rspamd_fuzzy_test.c
|
|
rspamd_test_suite.c
|
|
rspamd_url_test.c
|
|
rspamd_dns_test.c
|
|
rspamd_async_test.c)
|
|
|
|
ADD_EXECUTABLE(rspamd-test EXCLUDE_FROM_ALL ${TESTSRC})
|
|
SET_TARGET_PROPERTIES(rspamd-test PROPERTIES LINKER_LANGUAGE C)
|
|
SET_TARGET_PROPERTIES(rspamd-test PROPERTIES COMPILE_FLAGS "-DRSPAMD_TEST")
|
|
TARGET_LINK_LIBRARIES(rspamd-test rspamd_lua)
|
|
TARGET_LINK_LIBRARIES(rspamd-test rspamdserver)
|
|
TARGET_LINK_LIBRARIES(rspamd-test event)
|
|
TARGET_LINK_LIBRARIES(rspamd-test m)
|
|
TARGET_LINK_LIBRARIES(rspamd-test ${GLIB2_LIBRARIES})
|
|
TARGET_LINK_LIBRARIES(rspamd-test ${CMAKE_REQUIRED_LIBRARIES})
|
|
IF(HAVE_LIBEVENT2)
|
|
TARGET_LINK_LIBRARIES(rspamd-test event_pthreads)
|
|
ENDIF(HAVE_LIBEVENT2)
|
|
INCLUDE_DIRECTORIES("${CMAKE_CURRENT_SOURCE_DIR}/src")
|
|
IF(GMIME2_FOUND)
|
|
TARGET_LINK_LIBRARIES(rspamd-test ${GMIME2_LIBRARIES})
|
|
ELSE(GMIME2_FOUND)
|
|
TARGET_LINK_LIBRARIES(rspamd-test ${GMIME24_LIBRARIES})
|
|
ENDIF(GMIME2_FOUND)
|
|
IF(ENABLE_STATIC MATCHES "ON")
|
|
TARGET_LINK_LIBRARIES(rspamd-test ${PCRE_LIBRARIES})
|
|
ENDIF(ENABLE_STATIC MATCHES "ON")
|
|
IF(ENABLE_LUAJIT MATCHES "ON")
|
|
TARGET_LINK_LIBRARIES(rspamd-test "${LUAJIT_LIBRARY}")
|
|
ELSE(ENABLE_LUAJIT MATCHES "ON")
|
|
TARGET_LINK_LIBRARIES(rspamd-test "${LUA_LIBRARY}")
|
|
ENDIF(ENABLE_LUAJIT MATCHES "ON")
|