Skip to content

Commit 66627d8

Browse files
committed
build: obsolete options which have long been deprecated
This is simply dropping the error that would be presented for any existing usage. These have been rooted out for some time now. Remove the obsoleted checks.
1 parent 75713b8 commit 66627d8

File tree

1 file changed

+12
-37
lines changed

1 file changed

+12
-37
lines changed

cmake/modules/AddSwift.cmake

Lines changed: 12 additions & 37 deletions
Original file line numberDiff line numberDiff line change
@@ -1542,15 +1542,10 @@ endfunction()
15421542
# Sources to add into this library.
15431543
function(add_swift_host_library name)
15441544
set(options
1545-
FORCE_BUILD_OPTIMIZED
15461545
SHARED
15471546
STATIC)
15481547
set(single_parameter_options)
15491548
set(multiple_parameter_options
1550-
C_COMPILE_FLAGS
1551-
DEPENDS
1552-
FILE_DEPENDS
1553-
LINK_LIBRARIES
15541549
LLVM_LINK_COMPONENTS)
15551550

15561551
cmake_parse_arguments(ASHL
@@ -1560,22 +1555,6 @@ function(add_swift_host_library name)
15601555
${ARGN})
15611556
set(ASHL_SOURCES ${ASHL_UNPARSED_ARGUMENTS})
15621557

1563-
if(ASHL_FORCE_BUILD_OPTIMIZED)
1564-
message(SEND_ERROR "library ${name} is using FORCE_BUILD_OPTIMIZED flag which is deprecated. Please use target_compile_options instead")
1565-
endif()
1566-
if(ASHL_C_COMPILE_FLAGS)
1567-
message(SEND_ERROR "library ${name} is using C_COMPILE_FLAGS parameter which is deprecated. Please use target_compile_definitions, target_compile_options, or target_include_directories instead")
1568-
endif()
1569-
if(ASHL_DEPENDS)
1570-
message(SEND_ERROR "library ${name} is using DEPENDS parameter which is deprecated. Please use add_dependencies instead")
1571-
endif()
1572-
if(ASHL_FILE_DEPENDS)
1573-
message(SEND_ERROR "library ${name} is using FILE_DEPENDS parameter which is deprecated.")
1574-
endif()
1575-
if(ASHL_LINK_LIBRARIES)
1576-
message(SEND_ERROR "library ${name} is using LINK_LIBRARIES parameter which is deprecated. Please use target_link_libraries instead")
1577-
endif()
1578-
15791558
translate_flags(ASHL "${options}")
15801559

15811560
if(NOT ASHL_SHARED AND NOT ASHL_STATIC)
@@ -2524,22 +2503,22 @@ endfunction()
25242503
# [ARCHITECTURE architecture]
25252504
# Architecture to build for.
25262505
function(_add_swift_executable_single name)
2527-
# Parse the arguments we were given.
2506+
set(options)
2507+
set(single_parameter_options
2508+
ARCHITECTURE
2509+
SDK)
2510+
set(multiple_parameter_options
2511+
COMPILE_FLAGS
2512+
DEPENDS
2513+
LLVM_LINK_COMPONENTS)
25282514
cmake_parse_arguments(SWIFTEXE_SINGLE
2529-
"EXCLUDE_FROM_ALL"
2530-
"SDK;ARCHITECTURE"
2531-
"DEPENDS;LLVM_LINK_COMPONENTS;LINK_LIBRARIES;COMPILE_FLAGS"
2515+
"${options}"
2516+
"${single_parameter_options}"
2517+
"${multiple_parameter_options}"
25322518
${ARGN})
25332519

25342520
set(SWIFTEXE_SINGLE_SOURCES ${SWIFTEXE_SINGLE_UNPARSED_ARGUMENTS})
25352521

2536-
if(SWIFTEXE_SINGLE_EXCLUDE_FROM_ALL)
2537-
message(SEND_ERROR "${name} is using EXCLUDE_FROM_ALL option which is deprecated.")
2538-
endif()
2539-
if(SWIFTEXE_SINGLE_LINK_LIBRARIES)
2540-
message(SEND_ERROR "${name} is using LINK_LIBRARIES parameter which is deprecated. Please use target_link_libraries instead")
2541-
endif()
2542-
25432522
# Check arguments.
25442523
precondition(SWIFTEXE_SINGLE_SDK MESSAGE "Should specify an SDK")
25452524
precondition(SWIFTEXE_SINGLE_ARCHITECTURE MESSAGE "Should specify an architecture")
@@ -2663,18 +2642,14 @@ endmacro()
26632642
function(add_swift_host_tool executable)
26642643
set(options)
26652644
set(single_parameter_options SWIFT_COMPONENT)
2666-
set(multiple_parameter_options LINK_LIBRARIES)
2645+
set(multiple_parameter_options)
26672646

26682647
cmake_parse_arguments(ASHT
26692648
"${options}"
26702649
"${single_parameter_options}"
26712650
"${multiple_parameter_options}"
26722651
${ARGN})
26732652

2674-
if(ASHT_LINK_LIBRARIES)
2675-
message(SEND_ERROR "${executable} is using LINK_LIBRARIES parameter which is deprecated. Please use target_link_libraries instead")
2676-
endif()
2677-
26782653
precondition(ASHT_SWIFT_COMPONENT
26792654
MESSAGE "Swift Component is required to add a host tool")
26802655

0 commit comments

Comments
 (0)