Mercurial > hg > freeDiameter
view freeDiameter/tests/CMakeLists.txt @ 7:e5af94b04946
Added dispatch module and tests
author | Sebastien Decugis <sdecugis@nict.go.jp> |
---|---|
date | Fri, 04 Sep 2009 18:05:25 +0900 |
parents | ef303f1078ab |
children | 3e143f047f78 |
line wrap: on
line source
# Test directory PROJECT("libfreeDiameter tests" C) # give the possibility to configure the timeout duration for the tests OPTION(TEST_TIMEOUT "Timeout for the tests, in seconds (default: 5)?") IF(TEST_TIMEOUT) ADD_DEFINITIONS(-DTEST_TIMEOUT=${TEST_TIMEOUT}) ENDIF(TEST_TIMEOUT) ############################# # List the test cases SET(TEST_LIST testlist testdict testmesg testmq testsess testdisp ) ############################# # Some parameters for the tests ADD_DEFINITIONS(-DTEST_DEBUG) ADD_DEFINITIONS(-DTRACE_LEVEL=NONE) INCLUDE_DIRECTORIES( ".." ) INCLUDE_DIRECTORIES( "../../libfreeDiameter" ) SET(TEST_COMMON_SRC "") FOREACH( SRC_FILE ${FD_COMMON_SRC}) SET(TEST_COMMON_SRC ${TEST_COMMON_SRC} "../${SRC_FILE}") ENDFOREACH(SRC_FILE) # FOREACH( SRC_FILE ${FD_COMMON_GEN_SRC}) # SET(TEST_COMMON_SRC ${TEST_COMMON_SRC} "${CMAKE_CURRENT_BINARY_DIR}/../${SRC_FILE}") # ENDFOREACH(SRC_FILE) FOREACH( SRC_FILE ${LFD_SRC}) SET(TEST_COMMON_SRC ${TEST_COMMON_SRC} "../../libfreeDiameter/${SRC_FILE}") ENDFOREACH(SRC_FILE) # Create an archive with the daemon common files (all but main) ADD_LIBRARY(fDcore STATIC ${TEST_COMMON_SRC}) ############################# # Compile each test FOREACH( TEST ${TEST_LIST} ) ADD_EXECUTABLE(${TEST} ${TEST}.c tests.h) TARGET_LINK_LIBRARIES(${TEST} fDcore ${FD_LIBS}) ADD_TEST(${TEST} ${EXECUTABLE_OUTPUT_PATH}/${TEST}) ENDFOREACH( TEST )