1 2set(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 ) 26 27set(UT_COMMON_FILES ../libtest/first.c ../libtest/test.h curlcheck.h) 28include_directories( 29 ${CURL_SOURCE_DIR}/lib # To be able to reach "curl_setup_once.h" 30 ${CURL_SOURCE_DIR}/tests/libtest 31 ${CURL_SOURCE_DIR}/src 32 ${CURL_BINARY_DIR}/lib # To be able to reach "curl_config.h" 33 ${CURL_BINARY_DIR}/include # To be able to reach "curl/curl.h" 34) 35 36foreach(_testfile ${UT_SRC}) 37 38 get_filename_component(_testname ${_testfile} NAME_WE) 39 add_executable(${_testname} ${_testfile} ${UT_COMMON_FILES}) 40 target_link_libraries(${_testname} libcurl ${CURL_LIBS}) 41 set_target_properties(${_testname} 42 PROPERTIES COMPILE_DEFINITIONS "UNITTESTS") 43 44 if(HIDES_CURL_PRIVATE_SYMBOLS) 45 set_target_properties(${_testname} 46 PROPERTIES 47 EXCLUDE_FROM_ALL TRUE 48 EXCLUDE_FROM_DEFAULT_BUILD TRUE 49 ) 50 else() 51 add_test(NAME ${_testname} 52 COMMAND ${_testname} "http://www.google.com" 53 ) 54 endif() 55endforeach() 56