mirror of
https://github.com/curl/curl.git
synced 2026-06-07 19:54:17 +03:00
cm defs 1 test
This commit is contained in:
parent
58b9c6134b
commit
464e1e73bc
6 changed files with 31 additions and 22 deletions
|
|
@ -24,8 +24,10 @@
|
|||
|
||||
set(LIBCURL_OUTPUT_NAME "${LIB_NAME}" CACHE STRING "Basename of the curl library")
|
||||
|
||||
set_property(DIRECTORY APPEND PROPERTY COMPILE_DEFINITIONS "BUILDING_LIBCURL")
|
||||
set_property(DIRECTORY APPEND PROPERTY COMPILE_DEFINITIONS "${CURL_DEBUG_MACROS}")
|
||||
set_property(DIRECTORY APPEND PROPERTY COMPILE_DEFINITIONS
|
||||
"BUILDING_LIBCURL"
|
||||
${CURL_DEBUG_MACROS}
|
||||
)
|
||||
|
||||
configure_file("curl_config.h.cmake" "${CMAKE_CURRENT_BINARY_DIR}/curl_config.h")
|
||||
|
||||
|
|
|
|||
|
|
@ -46,7 +46,9 @@ target_include_directories(${BUNDLE} PRIVATE
|
|||
"${PROJECT_SOURCE_DIR}/lib" # for "curl_setup.h", curlx
|
||||
"${CMAKE_CURRENT_SOURCE_DIR}" # for the generated bundle source to find included test sources
|
||||
)
|
||||
set_property(TARGET ${BUNDLE} APPEND PROPERTY COMPILE_DEFINITIONS "CURL_NO_OLDIES")
|
||||
set_property(TARGET ${BUNDLE} APPEND PROPERTY COMPILE_DEFINITIONS
|
||||
"CURL_NO_OLDIES"
|
||||
)
|
||||
set_target_properties(${BUNDLE} PROPERTIES OUTPUT_NAME "${BUNDLE}" PROJECT_LABEL "Test ${BUNDLE}" UNITY_BUILD OFF C_CLANG_TIDY "")
|
||||
|
||||
curl_add_clang_tidy_test_target("${BUNDLE}-clang-tidy" ${BUNDLE} ${FIRST_C} ${TESTS_C})
|
||||
|
|
|
|||
|
|
@ -55,8 +55,10 @@ target_include_directories(${BUNDLE} PRIVATE
|
|||
"${PROJECT_SOURCE_DIR}/lib" # for "curl_setup.h", curlx
|
||||
"${CMAKE_CURRENT_SOURCE_DIR}" # for the generated bundle source to find included test sources
|
||||
)
|
||||
set_property(TARGET ${BUNDLE} APPEND PROPERTY COMPILE_DEFINITIONS "${CURL_DEBUG_MACROS}")
|
||||
set_property(TARGET ${BUNDLE} APPEND PROPERTY COMPILE_DEFINITIONS "CURL_NO_OLDIES" "CURL_DISABLE_DEPRECATION")
|
||||
set_property(TARGET ${BUNDLE} APPEND PROPERTY COMPILE_DEFINITIONS
|
||||
${CURL_DEBUG_MACROS}
|
||||
"CURL_NO_OLDIES" "CURL_DISABLE_DEPRECATION"
|
||||
)
|
||||
set_target_properties(${BUNDLE} PROPERTIES OUTPUT_NAME "${BUNDLE}" PROJECT_LABEL "Test ${BUNDLE}" UNITY_BUILD OFF C_CLANG_TIDY "")
|
||||
|
||||
curl_add_clang_tidy_test_target("${BUNDLE}-clang-tidy" ${BUNDLE} ${FIRST_C} ${UTILS_C} ${TESTS_C})
|
||||
|
|
|
|||
|
|
@ -42,17 +42,17 @@ target_include_directories(${BUNDLE} PRIVATE
|
|||
"${PROJECT_SOURCE_DIR}/lib" # for "curl_setup.h", curlx
|
||||
"${CMAKE_CURRENT_SOURCE_DIR}" # for the generated bundle source to find included test sources
|
||||
)
|
||||
set_property(TARGET ${BUNDLE} APPEND PROPERTY COMPILE_DEFINITIONS "WITHOUT_LIBCURL")
|
||||
set_property(TARGET ${BUNDLE} APPEND PROPERTY COMPILE_DEFINITIONS "CURL_NO_OLDIES")
|
||||
# Test servers simply are standalone programs that do not use libcurl
|
||||
# library. For convenience and to ease portability of these servers,
|
||||
# some source code files from the libcurl subdirectory are also used
|
||||
# to build the servers. In order to achieve proper linkage of these
|
||||
# files on Windows targets it is necessary to build the test servers
|
||||
# with CURL_STATICLIB defined, independently of how libcurl is built.
|
||||
if(WIN32)
|
||||
set_property(TARGET ${BUNDLE} APPEND PROPERTY COMPILE_DEFINITIONS "CURL_STATICLIB")
|
||||
endif()
|
||||
set_property(TARGET ${BUNDLE} APPEND PROPERTY COMPILE_DEFINITIONS
|
||||
"WITHOUT_LIBCURL"
|
||||
"CURL_NO_OLDIES"
|
||||
# Test servers simply are standalone programs that do not use libcurl
|
||||
# library. For convenience and to ease portability of these servers,
|
||||
# some source code files from the libcurl subdirectory are also used
|
||||
# to build the servers. In order to achieve proper linkage of these
|
||||
# files on Windows targets it is necessary to build the test servers
|
||||
# with CURL_STATICLIB defined, independently of how libcurl is built.
|
||||
"$<$<BOOL:WIN32>:CURL_STATICLIB>"
|
||||
)
|
||||
set_target_properties(${BUNDLE} PROPERTIES OUTPUT_NAME "${BUNDLE}" PROJECT_LABEL "Test ${BUNDLE}" UNITY_BUILD OFF C_CLANG_TIDY "")
|
||||
|
||||
curl_add_clang_tidy_test_target("${BUNDLE}-clang-tidy" ${BUNDLE} ${FIRST_C} ${UTILS_C} ${TESTS_C})
|
||||
|
|
|
|||
|
|
@ -44,8 +44,10 @@ target_include_directories(${BUNDLE} PRIVATE
|
|||
"${PROJECT_SOURCE_DIR}/tests/libtest" # for "first.h", "unitcheck.h"
|
||||
"${CMAKE_CURRENT_SOURCE_DIR}" # for the generated bundle source to find included test sources
|
||||
)
|
||||
set_property(TARGET ${BUNDLE} APPEND PROPERTY COMPILE_DEFINITIONS "${CURL_DEBUG_MACROS}")
|
||||
set_property(TARGET ${BUNDLE} APPEND PROPERTY COMPILE_DEFINITIONS "CURL_NO_OLDIES" "CURL_DISABLE_DEPRECATION")
|
||||
set_property(TARGET ${BUNDLE} APPEND PROPERTY COMPILE_DEFINITIONS
|
||||
${CURL_DEBUG_MACROS}
|
||||
"CURL_NO_OLDIES" "CURL_DISABLE_DEPRECATION"
|
||||
)
|
||||
set_target_properties(${BUNDLE} PROPERTIES OUTPUT_NAME "${BUNDLE}" PROJECT_LABEL "Test ${BUNDLE}" UNITY_BUILD OFF C_CLANG_TIDY "")
|
||||
|
||||
curl_add_clang_tidy_test_target("${BUNDLE}-clang-tidy" ${BUNDLE} ${FIRST_C} ${TESTS_C})
|
||||
|
|
|
|||
|
|
@ -44,10 +44,11 @@ target_include_directories(${BUNDLE} PRIVATE
|
|||
"${PROJECT_SOURCE_DIR}/tests/libtest" # for "first.h", "unitcheck.h"
|
||||
"${CMAKE_CURRENT_SOURCE_DIR}" # for the generated bundle source to find included test sources
|
||||
)
|
||||
set_property(TARGET ${BUNDLE} APPEND PROPERTY COMPILE_DEFINITIONS "${CURL_DEBUG_MACROS}")
|
||||
set_property(TARGET ${BUNDLE} APPEND PROPERTY COMPILE_DEFINITIONS "CURL_NO_OLDIES" "CURL_DISABLE_DEPRECATION")
|
||||
# unit tests are small pretend-libcurl-programs
|
||||
set_property(TARGET ${BUNDLE} APPEND PROPERTY COMPILE_DEFINITIONS "BUILDING_LIBCURL")
|
||||
set_property(TARGET ${BUNDLE} APPEND PROPERTY COMPILE_DEFINITIONS
|
||||
${CURL_DEBUG_MACROS}
|
||||
"CURL_NO_OLDIES" "CURL_DISABLE_DEPRECATION"
|
||||
"BUILDING_LIBCURL" # unit tests are small pretend-libcurl-programs
|
||||
)
|
||||
set_target_properties(${BUNDLE} PROPERTIES OUTPUT_NAME "${BUNDLE}" PROJECT_LABEL "Test ${BUNDLE}" UNITY_BUILD OFF C_CLANG_TIDY "")
|
||||
|
||||
curl_add_clang_tidy_test_target("${BUNDLE}-clang-tidy" ${BUNDLE} ${FIRST_C} ${TESTS_C})
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue