1#*************************************************************************** 2# _ _ ____ _ 3# Project ___| | | | _ \| | 4# / __| | | | |_) | | 5# | (__| |_| | _ <| |___ 6# \___|\___/|_| \_\_____| 7# 8# Copyright (C) 1998 - 2021, Daniel Stenberg, <daniel@haxx.se>, et al. 9# 10# This software is licensed as described in the file COPYING, which 11# you should have received as part of this distribution. The terms 12# are also available at https://curl.se/docs/copyright.html. 13# 14# You may opt to use, copy, modify, merge, publish, distribute and/or sell 15# copies of the Software, and permit persons to whom the Software is 16# furnished to do so, under the terms of the COPYING file. 17# 18# This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY 19# KIND, either express or implied. 20# 21########################################################################### 22 23# TODO build a special libcurlu library for unittests. 24return() 25 26set(UT_SRC 27 unit1300.c 28 unit1301.c 29 unit1302.c 30 unit1303.c 31 unit1304.c 32 unit1305.c 33 unit1307.c 34 unit1308.c 35 unit1309.c 36 unit1330.c 37# Broken link on Linux 38# unit1394.c 39 unit1395.c 40 unit1396.c 41 unit1397.c 42 unit1398.c 43 unit1600.c 44 unit1601.c 45 unit1603.c 46# Broken link on Linux 47# unit1604.c 48 unit1620.c 49 unit1655.c 50 ) 51 52set(UT_COMMON_FILES ../libtest/first.c ../libtest/test.h curlcheck.h) 53include_directories( 54 ${CURL_SOURCE_DIR}/lib # To be able to reach "curl_setup_once.h" 55 ${CURL_SOURCE_DIR}/tests/libtest 56 ${CURL_SOURCE_DIR}/src 57 ${CURL_BINARY_DIR}/lib # To be able to reach "curl_config.h" 58 ${CURL_BINARY_DIR}/include # To be able to reach "curl/curl.h" 59) 60 61foreach(_testfile ${UT_SRC}) 62 63 get_filename_component(_testname ${_testfile} NAME_WE) 64 add_executable(${_testname} EXCLUDE_FROM_ALL ${_testfile} ${UT_COMMON_FILES}) 65 #add_dependencies(testdeps ${_testname}) 66 target_link_libraries(${_testname} libcurl ${CURL_LIBS}) 67 set_target_properties(${_testname} 68 PROPERTIES COMPILE_DEFINITIONS "UNITTESTS") 69endforeach() 70