aboutsummaryrefslogtreecommitdiffstats
path: root/test/CMakeLists.txt
blob: 9932fb87dd728cc90851efb1fc823f5171a11d69 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
SET(TESTSRC		rspamd_expression_test.c
				rspamd_mem_pool_test.c
				rspamd_statfile_test.c
				rspamd_fuzzy_test.c
				rspamd_url_test.c
				rspamd_dns_test.c
				rspamd_async_test.c
				rspamd_dkim_test.c
				rspamd_rrd_test.c
				rspamd_radix_test.c
				rspamd_shingles_test.c
				rspamd_upstream_test.c
				rspamd_http_test.c
				rspamd_lua_test.c
				rspamd_test_suite.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-server)
TARGET_LINK_LIBRARIES(rspamd-test ${RSPAMD_REQUIRED_LIBRARIES})
TARGET_LINK_LIBRARIES(rspamd-test stemmer)

IF(NOT ${CMAKE_CURRENT_SOURCE_DIR} STREQUAL ${CMAKE_CURRENT_BINARY_DIR}) 
	FILE(COPY "${CMAKE_CURRENT_SOURCE_DIR}/busted.lua" 
			  "${CMAKE_CURRENT_SOURCE_DIR}/busted"
			  "${CMAKE_CURRENT_SOURCE_DIR}/lua"
			  DESTINATION ${CMAKE_CURRENT_BINARY_DIR})
	
ENDIF()