Annotation of embedaddon/curl/tests/unit/CMakeLists.txt, revision 1.1

1.1     ! misho       1: #***************************************************************************
        !             2: #                                  _   _ ____  _
        !             3: #  Project                     ___| | | |  _ \| |
        !             4: #                             / __| | | | |_) | |
        !             5: #                            | (__| |_| |  _ <| |___
        !             6: #                             \___|\___/|_| \_\_____|
        !             7: #
        !             8: # Copyright (C) 1998 - 2020, 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.haxx.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: set(UT_SRC
        !            24:   unit1300.c
        !            25:   unit1301.c
        !            26:   unit1302.c
        !            27:   unit1303.c
        !            28:   unit1304.c
        !            29:   unit1305.c
        !            30:   unit1307.c
        !            31:   unit1308.c
        !            32:   unit1309.c
        !            33:   unit1330.c
        !            34: # Broken link on Linux
        !            35: #  unit1394.c
        !            36:   unit1395.c
        !            37:   unit1396.c
        !            38:   unit1397.c
        !            39:   unit1398.c
        !            40:   unit1600.c
        !            41:   unit1601.c
        !            42:   unit1603.c
        !            43: # Broken link on Linux
        !            44: #  unit1604.c
        !            45:   unit1620.c
        !            46:   unit1655.c
        !            47:   )
        !            48: 
        !            49: set(UT_COMMON_FILES ../libtest/first.c ../libtest/test.h curlcheck.h)
        !            50: include_directories(
        !            51:   ${CURL_SOURCE_DIR}/lib          # To be able to reach "curl_setup_once.h"
        !            52:   ${CURL_SOURCE_DIR}/tests/libtest
        !            53:   ${CURL_SOURCE_DIR}/src
        !            54:   ${CURL_BINARY_DIR}/lib          # To be able to reach "curl_config.h"
        !            55:   ${CURL_BINARY_DIR}/include      # To be able to reach "curl/curl.h"
        !            56: )
        !            57: 
        !            58: foreach(_testfile ${UT_SRC})
        !            59: 
        !            60:   get_filename_component(_testname ${_testfile} NAME_WE)
        !            61:   add_executable(${_testname} ${_testfile} ${UT_COMMON_FILES})
        !            62:   target_link_libraries(${_testname} libcurl ${CURL_LIBS})
        !            63:   set_target_properties(${_testname}
        !            64:       PROPERTIES COMPILE_DEFINITIONS "UNITTESTS")
        !            65: 
        !            66:   if(HIDES_CURL_PRIVATE_SYMBOLS)
        !            67:     set_target_properties(${_testname}
        !            68:       PROPERTIES
        !            69:       EXCLUDE_FROM_ALL TRUE
        !            70:       EXCLUDE_FROM_DEFAULT_BUILD TRUE
        !            71:     )
        !            72:   else()
        !            73:     add_test(NAME ${_testname}
        !            74:              COMMAND ${_testname} "http://www.google.com"
        !            75:     )
        !            76:   endif()
        !            77: endforeach()

FreeBSD-CVSweb <freebsd-cvsweb@FreeBSD.org>