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

1.1     ! misho       1: #***************************************************************************
        !             2: #                                  _   _ ____  _
        !             3: #  Project                     ___| | | |  _ \| |
        !             4: #                             / __| | | | |_) | |
        !             5: #                            | (__| |_| |  _ <| |___
        !             6: #                             \___|\___/|_| \_\_____|
        !             7: #
        !             8: # Copyright (C) 2009 - 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: set(TARGET_LABEL_PREFIX "Test server ")
        !            23: 
        !            24: if(MSVC)
        !            25:   set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} /wd4306")
        !            26: endif()
        !            27: 
        !            28: function(SETUP_EXECUTABLE TEST_NAME)    # ARGN are the files in the test
        !            29:   add_executable(${TEST_NAME} ${ARGN})
        !            30:   string(TOUPPER ${TEST_NAME} UPPER_TEST_NAME)
        !            31: 
        !            32:   include_directories(
        !            33:     ${CURL_SOURCE_DIR}/lib      # To be able to reach "curl_setup_once.h"
        !            34:     ${CURL_BINARY_DIR}/lib      # To be able to reach "curl_config.h"
        !            35:     ${CURL_BINARY_DIR}/include  # To be able to reach "curl/curl.h"
        !            36:     )
        !            37:   if(USE_ARES)
        !            38:     include_directories(${CARES_INCLUDE_DIR})
        !            39:   endif()
        !            40: 
        !            41:   target_link_libraries(${TEST_NAME} ${CURL_LIBS})
        !            42: 
        !            43:   # Test servers simply are standalone programs that do not use libcurl
        !            44:   # library.  For convenience and to ease portability of these servers,
        !            45:   # some source code files from the libcurl subdirectory are also used
        !            46:   # to build the servers.  In order to achieve proper linkage of these
        !            47:   # files on Win32 targets it is necessary to build the test servers
        !            48:   # with CURL_STATICLIB defined, independently of how libcurl is built.
        !            49:   if(BUILD_SHARED_LIBS)
        !            50:     set_target_properties(${TEST_NAME} PROPERTIES
        !            51:       COMPILE_DEFINITIONS CURL_STATICLIB)       # ${UPPER_TEST_NAME}
        !            52:   endif()
        !            53:   set_target_properties(${TEST_NAME} PROPERTIES
        !            54:     PROJECT_LABEL "${TARGET_LABEL_PREFIX}${TEST_NAME}")
        !            55: endfunction()
        !            56: 
        !            57: 
        !            58: transform_makefile_inc("Makefile.inc"
        !            59:   "${CMAKE_CURRENT_BINARY_DIR}/Makefile.inc.cmake")
        !            60: include(${CMAKE_CURRENT_BINARY_DIR}/Makefile.inc.cmake)
        !            61: 
        !            62: foreach(EXECUTABLE_NAME ${noinst_PROGRAMS})
        !            63:   setup_executable(${EXECUTABLE_NAME} ${${EXECUTABLE_NAME}_SOURCES})
        !            64: endforeach()
        !            65: 
        !            66: 
        !            67: # SET(useful
        !            68: # getpart.c getpart.h
        !            69: # ${CURL_SOURCE_DIR}/lib/strequal.c
        !            70: # ${CURL_SOURCE_DIR}/lib/base64.c
        !            71: # ${CURL_SOURCE_DIR}/lib/mprintf.c
        !            72: # ${CURL_SOURCE_DIR}/lib/memdebug.c
        !            73: # ${CURL_SOURCE_DIR}/lib/timeval.c
        !            74: # )
        !            75: 
        !            76: # SETUP_EXECUTABLE(sws sws.c util.c util.h ${useful})
        !            77: # SETUP_EXECUTABLE(resolve resolve.c util.c util.h ${useful})
        !            78: # SETUP_EXECUTABLE(sockfilt sockfilt.c util.c util.h ${useful} ${CURL_SOURCE_DIR}/lib/inet_pton.c)
        !            79: # SETUP_EXECUTABLE(getpart testpart.c ${useful})
        !            80: # SETUP_EXECUTABLE(tftpd tftpd.c util.c util.h ${useful} tftp.h)

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