2020-03-23 09:44:29 -04:00
|
|
|
#***************************************************************************
|
|
|
|
# _ _ ____ _
|
|
|
|
# Project ___| | | | _ \| |
|
|
|
|
# / __| | | | |_) | |
|
|
|
|
# | (__| |_| | _ <| |___
|
|
|
|
# \___|\___/|_| \_\_____|
|
|
|
|
#
|
|
|
|
# Copyright (C) 1998 - 2020, Daniel Stenberg, <daniel@haxx.se>, et al.
|
|
|
|
#
|
|
|
|
# This software is licensed as described in the file COPYING, which
|
|
|
|
# you should have received as part of this distribution. The terms
|
|
|
|
# are also available at https://curl.haxx.se/docs/copyright.html.
|
|
|
|
#
|
|
|
|
# You may opt to use, copy, modify, merge, publish, distribute and/or sell
|
|
|
|
# copies of the Software, and permit persons to whom the Software is
|
|
|
|
# furnished to do so, under the terms of the COPYING file.
|
|
|
|
#
|
|
|
|
# This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY
|
|
|
|
# KIND, either express or implied.
|
|
|
|
#
|
|
|
|
###########################################################################
|
2016-06-16 06:53:50 -04:00
|
|
|
|
2020-05-09 20:12:12 -04:00
|
|
|
# TODO build a special libcurlu library for unittests.
|
|
|
|
return()
|
|
|
|
|
2016-06-16 06:53:50 -04:00
|
|
|
set(UT_SRC
|
|
|
|
unit1300.c
|
|
|
|
unit1301.c
|
|
|
|
unit1302.c
|
|
|
|
unit1303.c
|
|
|
|
unit1304.c
|
|
|
|
unit1305.c
|
|
|
|
unit1307.c
|
|
|
|
unit1308.c
|
|
|
|
unit1309.c
|
|
|
|
unit1330.c
|
|
|
|
# Broken link on Linux
|
|
|
|
# unit1394.c
|
|
|
|
unit1395.c
|
|
|
|
unit1396.c
|
|
|
|
unit1397.c
|
|
|
|
unit1398.c
|
|
|
|
unit1600.c
|
|
|
|
unit1601.c
|
|
|
|
unit1603.c
|
|
|
|
# Broken link on Linux
|
|
|
|
# unit1604.c
|
2018-07-13 11:17:19 -04:00
|
|
|
unit1620.c
|
2019-09-13 21:16:09 -04:00
|
|
|
unit1655.c
|
2016-06-16 06:53:50 -04:00
|
|
|
)
|
|
|
|
|
|
|
|
set(UT_COMMON_FILES ../libtest/first.c ../libtest/test.h curlcheck.h)
|
|
|
|
include_directories(
|
|
|
|
${CURL_SOURCE_DIR}/lib # To be able to reach "curl_setup_once.h"
|
|
|
|
${CURL_SOURCE_DIR}/tests/libtest
|
|
|
|
${CURL_SOURCE_DIR}/src
|
|
|
|
${CURL_BINARY_DIR}/lib # To be able to reach "curl_config.h"
|
2017-05-22 03:05:10 -04:00
|
|
|
${CURL_BINARY_DIR}/include # To be able to reach "curl/curl.h"
|
2016-06-16 06:53:50 -04:00
|
|
|
)
|
|
|
|
|
|
|
|
foreach(_testfile ${UT_SRC})
|
|
|
|
|
|
|
|
get_filename_component(_testname ${_testfile} NAME_WE)
|
2020-05-09 20:10:20 -04:00
|
|
|
add_executable(${_testname} EXCLUDE_FROM_ALL ${_testfile} ${UT_COMMON_FILES})
|
|
|
|
#add_dependencies(testdeps ${_testname})
|
2016-06-16 06:53:50 -04:00
|
|
|
target_link_libraries(${_testname} libcurl ${CURL_LIBS})
|
|
|
|
set_target_properties(${_testname}
|
|
|
|
PROPERTIES COMPILE_DEFINITIONS "UNITTESTS")
|
|
|
|
endforeach()
|