diff options
author | Benoit Neil <suky0001@free.fr> | 2009-04-07 21:59:15 +0000 |
---|---|---|
committer | Benoit Neil <suky0001@free.fr> | 2009-04-07 21:59:15 +0000 |
commit | e9dd0998706a0ce099826b982bbb1671909fe026 (patch) | |
tree | 89947e0e7475380f446f0387a9b74d86d4ff9977 /tests/server | |
parent | 070d89a5610070e5af7178481bcaacce24bd9af2 (diff) |
Added missing tests in CMake, added Makefile.inc for tests (+ use in CMake scripts), and fixed a missing define under windows in a test source file.
Diffstat (limited to 'tests/server')
-rw-r--r-- | tests/server/CMakeLists.txt | 37 | ||||
-rw-r--r-- | tests/server/Makefile.am | 25 | ||||
-rw-r--r-- | tests/server/Makefile.inc | 22 |
3 files changed, 46 insertions, 38 deletions
diff --git a/tests/server/CMakeLists.txt b/tests/server/CMakeLists.txt index 0df7e16db..2968a218b 100644 --- a/tests/server/CMakeLists.txt +++ b/tests/server/CMakeLists.txt @@ -27,19 +27,26 @@ MACRO(SETUP_EXECUTABLE TEST_NAME) # ARGN are the files in the test ENDMACRO() - -SET(useful - getpart.c getpart.h - ${CURL_SOURCE_DIR}/lib/strequal.c - ${CURL_SOURCE_DIR}/lib/base64.c - ${CURL_SOURCE_DIR}/lib/mprintf.c - ${CURL_SOURCE_DIR}/lib/memdebug.c - ${CURL_SOURCE_DIR}/lib/timeval.c -) - -SETUP_EXECUTABLE(sws sws.c util.c util.h ${useful}) -SETUP_EXECUTABLE(resolve resolve.c util.c util.h ${useful}) -SETUP_EXECUTABLE(sockfilt sockfilt.c util.c util.h ${useful} ${CURL_SOURCE_DIR}/lib/inet_pton.c) -SETUP_EXECUTABLE(getpart testpart.c ${useful}) -SETUP_EXECUTABLE(tftpd tftpd.c util.c util.h ${useful} tftp.h) +TRANSFORM_MAKEFILE_INC("Makefile.inc" "${CMAKE_CURRENT_BINARY_DIR}/Makefile.inc.cmake") +INCLUDE(${CMAKE_CURRENT_BINARY_DIR}/Makefile.inc.cmake) + +FOREACH(EXECUTABLE_NAME ${noinst_PROGRAMS}) + SETUP_EXECUTABLE(${EXECUTABLE_NAME} ${${EXECUTABLE_NAME}_SOURCES}) +ENDFOREACH() + + +# SET(useful + # getpart.c getpart.h + # ${CURL_SOURCE_DIR}/lib/strequal.c + # ${CURL_SOURCE_DIR}/lib/base64.c + # ${CURL_SOURCE_DIR}/lib/mprintf.c + # ${CURL_SOURCE_DIR}/lib/memdebug.c + # ${CURL_SOURCE_DIR}/lib/timeval.c +# ) + +# SETUP_EXECUTABLE(sws sws.c util.c util.h ${useful}) +# SETUP_EXECUTABLE(resolve resolve.c util.c util.h ${useful}) +# SETUP_EXECUTABLE(sockfilt sockfilt.c util.c util.h ${useful} ${CURL_SOURCE_DIR}/lib/inet_pton.c) +# SETUP_EXECUTABLE(getpart testpart.c ${useful}) +# SETUP_EXECUTABLE(tftpd tftpd.c util.c util.h ${useful} tftp.h) diff --git a/tests/server/Makefile.am b/tests/server/Makefile.am index 74f0ec2f3..4b8055f09 100644 --- a/tests/server/Makefile.am +++ b/tests/server/Makefile.am @@ -37,28 +37,7 @@ INCLUDES = -I$(top_builddir)/include \ -I$(top_builddir)/lib \ -I$(top_srcdir)/lib -noinst_PROGRAMS = sws getpart sockfilt resolve tftpd - -useful = getpart.c getpart.h $(top_srcdir)/lib/strequal.c \ - $(top_srcdir)/lib/base64.c $(top_srcdir)/lib/mprintf.c \ - $(top_srcdir)/lib/memdebug.c $(top_srcdir)/lib/timeval.c - -resolve_SOURCES= resolve.c util.c util.h $(useful) -resolve_LDADD = @TEST_SERVER_LIBS@ - -sws_SOURCES= sws.c util.c util.h $(useful) -sws_LDADD = @TEST_SERVER_LIBS@ - -sockfilt_SOURCES = sockfilt.c util.c util.h $(useful) \ - $(top_srcdir)/lib/inet_pton.c -sockfilt_LDADD = @TEST_SERVER_LIBS@ - -getpart_SOURCES= testpart.c $(useful) -# This is needed because of (unused) network debugging functions in memdebug.c -getpart_LDADD = @TEST_SERVER_LIBS@ - -tftpd_SOURCES = tftpd.c util.c util.h $(useful) tftp.h -tftpd_LDADD = @TEST_SERVER_LIBS@ +# Makefile.inc provides the source defines (noinst_PROGRAMS, useful, *_SOURCES, and *_LDADD) +include Makefile.inc extra_DIST = base64.pl - diff --git a/tests/server/Makefile.inc b/tests/server/Makefile.inc new file mode 100644 index 000000000..b4394f9e8 --- /dev/null +++ b/tests/server/Makefile.inc @@ -0,0 +1,22 @@ +noinst_PROGRAMS = sws getpart sockfilt resolve tftpd + +useful = getpart.c getpart.h $(top_srcdir)/lib/strequal.c \ + $(top_srcdir)/lib/base64.c $(top_srcdir)/lib/mprintf.c \ + $(top_srcdir)/lib/memdebug.c $(top_srcdir)/lib/timeval.c + +resolve_SOURCES= resolve.c util.c util.h $(useful) +resolve_LDADD = @TEST_SERVER_LIBS@ + +sws_SOURCES= sws.c util.c util.h $(useful) +sws_LDADD = @TEST_SERVER_LIBS@ + +sockfilt_SOURCES = sockfilt.c util.c util.h $(useful) \ + $(top_srcdir)/lib/inet_pton.c +sockfilt_LDADD = @TEST_SERVER_LIBS@ + +getpart_SOURCES= testpart.c $(useful) +# This is needed because of (unused) network debugging functions in memdebug.c +getpart_LDADD = @TEST_SERVER_LIBS@ + +tftpd_SOURCES = tftpd.c util.c util.h $(useful) tftp.h +tftpd_LDADD = @TEST_SERVER_LIBS@ |