[autobuild] allow sendfile() in cross-compile (fixes #2836)
[lighttpd.git] / tests / CMakeLists.txt
blob993ef38aae9b8c30154320bfc3f36efb58556182
1 check_include_files(fastcgi.h HAVE_FASTCGI_H)
2 check_include_files(fastcgi/fastcgi.h HAVE_FASTCGI_FASTCGI_H)
3 if(HAVE_FASTCGI_H OR HAVE_FASTCGI_FASTCGI_H)
4         check_library_exists(fcgi FCGI_Accept "" HAVE_FASTCGI)
5         if(HAVE_FASTCGI)
6                 add_executable(fcgi-auth fcgi-auth.c)
7                 add_executable(fcgi-responder fcgi-responder.c)
8                 target_link_libraries(fcgi-auth fcgi)
9                 target_link_libraries(fcgi-responder fcgi)
10         endif()
11 endif()
12 add_executable(scgi-responder scgi-responder.c)
14 set(T_FILES
15         prepare.sh
16         cachable.t
17         core-404-handler.t
18         core-condition.t
19         core-keepalive.t
20         core-request.t
21         core-response.t
22         core.t
23         core-var-include.t
24         lowercase.t
25         mod-access.t
26         mod-auth.t
27         mod-cgi.t
28         mod-compress.t
29         mod-extforward.t
30         mod-fastcgi.t
31         mod-proxy.t
32         mod-redirect.t
33         mod-rewrite.t
34         mod-secdownload.t
35         mod-setenv.t
36         mod-simplevhost.t
37         mod-ssi.t
38         mod-userdir.t
39         request.t
40         symlink.t
41         cleanup.sh
44 foreach(it ${T_FILES})
45         add_test(NAME ${it} COMMAND "${lighttpd_SOURCE_DIR}/tests/wrapper.sh"
46                 "${lighttpd_SOURCE_DIR}/tests"
47                 "${lighttpd_BINARY_DIR}"
48                 "${lighttpd_SOURCE_DIR}/tests/${it}")
49 endforeach()