Debian Codegraph @

deps/curl/tests/unit/CMakeLists.txt

raw
1
2 set(UT_SRC
3 unit1300.c
4 unit1301.c
5 unit1302.c
6 unit1303.c
7 unit1304.c
8 unit1305.c
9 unit1307.c
10 unit1308.c
11 unit1309.c
12 unit1330.c
13 # Broken link on Linux
14 # unit1394.c
15 unit1395.c
16 unit1396.c
17 unit1397.c
18 unit1398.c
19 unit1600.c
20 unit1601.c
21 unit1603.c
22 # Broken link on Linux
23 # unit1604.c
24 unit1620.c
25 unit1655.c
26 )
27
28 set(UT_COMMON_FILES ../libtest/first.c ../libtest/test.h curlcheck.h)
29 include_directories(
30 ${CURL_SOURCE_DIR}/lib # To be able to reach "curl_setup_once.h"
31 ${CURL_SOURCE_DIR}/tests/libtest
32 ${CURL_SOURCE_DIR}/src
33 ${CURL_BINARY_DIR}/lib # To be able to reach "curl_config.h"
34 ${CURL_BINARY_DIR}/include # To be able to reach "curl/curl.h"
35 )
36
37 foreach(_testfile ${UT_SRC})
38
39 get_filename_component(_testname ${_testfile} NAME_WE)
40 add_executable(${_testname} ${_testfile} ${UT_COMMON_FILES})
41 target_link_libraries(${_testname} libcurl ${CURL_LIBS})
42 set_target_properties(${_testname}
43 PROPERTIES COMPILE_DEFINITIONS "UNITTESTS")
44
45 if(HIDES_CURL_PRIVATE_SYMBOLS)
46 set_target_properties(${_testname}
47 PROPERTIES
48 EXCLUDE_FROM_ALL TRUE
49 EXCLUDE_FROM_DEFAULT_BUILD TRUE
50 )
51 else()
52 add_test(NAME ${_testname}
53 COMMAND ${_testname} "http://www.google.com"
54 )
55 endif()
56 endforeach()