mirror of
https://github.com/curl/curl.git
synced 2026-06-09 13:24:14 +03:00
add <3.12 support
This commit is contained in:
parent
071528d3fa
commit
860dc6f7c6
1 changed files with 10 additions and 5 deletions
|
|
@ -33,12 +33,17 @@ set(_all "all")
|
|||
foreach(_target IN LISTS check_PROGRAMS _all) # keep '_all' last
|
||||
set(_target_name "curl-example-${_target}")
|
||||
if(_target STREQUAL "all")
|
||||
if(CMAKE_VERSION VERSION_LESS 3.12)
|
||||
continue()
|
||||
if(CMAKE_VERSION VERSION_GREATER_EQUAL 3.12)
|
||||
set(_examples_c "${check_PROGRAMS}")
|
||||
list(TRANSFORM _examples_c APPEND ".c")
|
||||
add_library(${_target_name} OBJECT EXCLUDE_FROM_ALL ${_examples_c})
|
||||
else()
|
||||
set(_examples_c "")
|
||||
foreach(_src IN LISTS check_PROGRAMS)
|
||||
list(APPEND _examples_c "${_src}.c")
|
||||
endforeach()
|
||||
add_library(${_target_name} STATIC EXCLUDE_FROM_ALL ${_examples_c})
|
||||
endif()
|
||||
set(_examples_c "${check_PROGRAMS}")
|
||||
list(TRANSFORM _examples_c APPEND ".c")
|
||||
add_library(${_target_name} OBJECT EXCLUDE_FROM_ALL ${_examples_c})
|
||||
add_custom_target(curl-examples-build) # Special target to compile all tests quickly and build a single test to probe linkage
|
||||
add_dependencies(curl-examples-build ${_target_name} ${_all_plus_one}) # Include a full build of a single test
|
||||
else()
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue