Skip to content

Commit 68c9966

Browse files
committed
[CMake] Use precondition in _add_swift_lipo_target
Use the `precondition` CMake function added in e12fff7, rather than custom logic, to check if arguments to `_add_swift_lipo_target` are not set.
1 parent 195f1d4 commit 68c9966

File tree

1 file changed

+2
-7
lines changed

1 file changed

+2
-7
lines changed

cmake/modules/AddSwift.cmake

Lines changed: 2 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -363,13 +363,8 @@ endfunction()
363363
# # lipo'd into the output.
364364
# )
365365
function(_add_swift_lipo_target target output)
366-
if("${target}" STREQUAL "")
367-
message(FATAL_ERROR "target is required")
368-
endif()
369-
370-
if("${output}" STREQUAL "")
371-
message(FATAL_ERROR "output is required")
372-
endif()
366+
precondition(target MESSAGE "target is required")
367+
precondition(output MESSAGE "output is required")
373368

374369
set(source_targets ${ARGN})
375370

0 commit comments

Comments
 (0)