Skip to content

Commit 81e5cdb

Browse files
authored
Merge pull request #24507 from compnerd/interface-with-the-sources
build: obsolete `INTERFACE_LINK_LIBRARIES`
2 parents d6a6315 + f9b304e commit 81e5cdb

File tree

1 file changed

+1
-17
lines changed

1 file changed

+1
-17
lines changed

cmake/modules/AddSwift.cmake

Lines changed: 1 addition & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -750,7 +750,6 @@ function(_add_swift_library_single target name)
750750
GYB_SOURCES
751751
INCORPORATE_OBJECT_LIBRARIES
752752
INCORPORATE_OBJECT_LIBRARIES_SHARED_ONLY
753-
INTERFACE_LINK_LIBRARIES
754753
LINK_FLAGS
755754
LINK_LIBRARIES
756755
LLVM_COMPONENT_DEPENDS
@@ -892,7 +891,6 @@ function(_add_swift_library_single target name)
892891
${SWIFTLIB_SINGLE_DEPENDS}
893892
${SWIFTLIB_SINGLE_FILE_DEPENDS}
894893
${SWIFTLIB_SINGLE_LINK_LIBRARIES}
895-
${SWIFTLIB_SINGLE_INTERFACE_LINK_LIBRARIES}
896894
SDK ${SWIFTLIB_SINGLE_SDK}
897895
ARCHITECTURE ${SWIFTLIB_SINGLE_ARCHITECTURE}
898896
MODULE_NAME ${module_name}
@@ -1313,7 +1311,7 @@ function(_add_swift_library_single target name)
13131311
# import library targets when the library was added. Use that to adjust the
13141312
# link libraries.
13151313
if(SWIFTLIB_SINGLE_SDK STREQUAL WINDOWS AND NOT CMAKE_SYSTEM_NAME STREQUAL Windows)
1316-
foreach(library_list LINK_LIBRARIES INTERFACE_LINK_LIBRARIES PRIVATE_LINK_LIBRARIES)
1314+
foreach(library_list LINK_LIBRARIES PRIVATE_LINK_LIBRARIES)
13171315
set(import_libraries)
13181316
foreach(library ${SWIFTLIB_SINGLE_${library_list}})
13191317
# Ensure that the library is a target. If an absolute path was given,
@@ -1342,14 +1340,6 @@ function(_add_swift_library_single target name)
13421340
target_link_libraries("${target}" PRIVATE
13431341
${SWIFTLIB_SINGLE_PRIVATE_LINK_LIBRARIES})
13441342
endif()
1345-
if("${libkind}" STREQUAL "OBJECT")
1346-
precondition_list_empty(
1347-
"${SWIFTLIB_SINGLE_INTERFACE_LINK_LIBRARIES}"
1348-
"OBJECT_LIBRARY may not link to anything")
1349-
else()
1350-
target_link_libraries("${target}" INTERFACE
1351-
${SWIFTLIB_SINGLE_INTERFACE_LINK_LIBRARIES})
1352-
endif()
13531343

13541344
set_property(TARGET "${target}" PROPERTY
13551345
LINKER_LANGUAGE "CXX")
@@ -1407,7 +1397,6 @@ function(add_swift_host_library name)
14071397
C_COMPILE_FLAGS
14081398
DEPENDS
14091399
FILE_DEPENDS
1410-
INTERFACE_LINK_LIBRARIES
14111400
LINK_LIBRARIES
14121401
LLVM_COMPONENT_DEPENDS)
14131402

@@ -1424,9 +1413,6 @@ function(add_swift_host_library name)
14241413
if(ASHL_DEPENDS)
14251414
message(SEND_ERROR "library ${name} is using DEPENDS parameter which is deprecated. Please use add_dependencies instead")
14261415
endif()
1427-
if(ASHL_INTERFACE_LINK_LIBRARIES)
1428-
message(SEND_ERROR "library ${name} is using INTERFACE_LINK_LIBRARIES parameter which is deprecated. Please use target_link_libraries instead.")
1429-
endif()
14301416
if(ASHL_LINK_LIBRARIES)
14311417
message(SEND_ERROR "library ${name} is using LINK_LIBRARIES parameter which is deprecated. Please use target_link_libraries instead")
14321418
endif()
@@ -1478,7 +1464,6 @@ endfunction()
14781464
# [STATIC]
14791465
# [DEPENDS dep1 ...]
14801466
# [LINK_LIBRARIES dep1 ...]
1481-
# [INTERFACE_LINK_LIBRARIES dep1 ...]
14821467
# [SWIFT_MODULE_DEPENDS dep1 ...]
14831468
# [FRAMEWORK_DEPENDS dep1 ...]
14841469
# [FRAMEWORK_DEPENDS_WEAK dep1 ...]
@@ -1631,7 +1616,6 @@ function(add_swift_target_library name)
16311616
GYB_SOURCES
16321617
INCORPORATE_OBJECT_LIBRARIES
16331618
INCORPORATE_OBJECT_LIBRARIES_SHARED_ONLY
1634-
INTERFACE_LINK_LIBRARIES
16351619
LINK_FLAGS
16361620
LINK_LIBRARIES
16371621
LLVM_COMPONENT_DEPENDS

0 commit comments

Comments
 (0)