Skip to content

Commit 2f8a4db

Browse files
authored
Merge pull request #19933 from compnerd/micro-opt
SourceKit: micro-optimization of CMake (NFC)
2 parents f5db1d2 + 8395e35 commit 2f8a4db

File tree

1 file changed

+16
-14
lines changed

1 file changed

+16
-14
lines changed

tools/SourceKit/cmake/modules/AddSwiftSourceKit.cmake

Lines changed: 16 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -338,31 +338,33 @@ macro(add_sourcekit_framework name)
338338
LIBRARY DESTINATION lib${LLVM_LIBDIR_SUFFIX}
339339
ARCHIVE DESTINATION lib${LLVM_LIBDIR_SUFFIX}
340340
RUNTIME DESTINATION bin)
341-
set_target_properties(${name} PROPERTIES FOLDER "SourceKit frameworks")
342341
set_output_directory(${name}
343342
BINARY_DIR ${SOURCEKIT_RUNTIME_OUTPUT_INTDIR}
344343
LIBRARY_DIR ${SOURCEKIT_LIBRARY_OUTPUT_INTDIR})
345-
set_target_properties(${name} PROPERTIES FRAMEWORK TRUE)
346-
set_target_properties(${name} PROPERTIES PUBLIC_HEADER "${headers}")
347-
set_target_properties(${name} PROPERTIES MACOSX_FRAMEWORK_INFO_PLIST "${SOURCEKIT_SOURCE_DIR}/cmake/MacOSXFrameworkInfo.plist.in")
348-
set_target_properties(${name} PROPERTIES MACOSX_FRAMEWORK_IDENTIFIER "com.apple.${name}")
349-
set_target_properties(${name} PROPERTIES MACOSX_FRAMEWORK_SHORT_VERSION_STRING "1.0")
350-
set_target_properties(${name} PROPERTIES MACOSX_FRAMEWORK_BUNDLE_VERSION "${SOURCEKIT_VERSION_STRING}")
351-
set_target_properties(${name} PROPERTIES BUILD_WITH_INSTALL_RPATH TRUE)
352-
set_target_properties(${name} PROPERTIES INSTALL_NAME_DIR "@rpath")
344+
set_target_properties(${name} PROPERTIES
345+
BUILD_WITH_INSTALL_RPATH TRUE
346+
FOLDER "SourceKit frameworks"
347+
FRAMEWORK TRUE
348+
INSTALL_NAME_DIR "@rpath"
349+
MACOSX_FRAMEWORK_INFO_PLIST "${SOURCEKIT_SOURCE_DIR}/cmake/MacOSXFrameworkInfo.plist.in"
350+
MACOSX_FRAMEWORK_IDENTIFIER "com.apple.${name}"
351+
MACOSX_FRAMEWORK_SHORT_VERSION_STRING "1.0"
352+
MACOSX_FRAMEWORK_BUNDLE_VERSION "${SOURCEKIT_VERSION_STRING}"
353+
PUBLIC_HEADER "${headers}")
353354
else()
354355
swift_install_in_component(${SOURCEKITFW_INSTALL_IN_COMPONENT}
355356
DIRECTORY ${framework_location}
356357
DESTINATION lib${LLVM_LIBDIR_SUFFIX}
357358
USE_SOURCE_PERMISSIONS)
358-
set_target_properties(${name} PROPERTIES FOLDER "SourceKit frameworks")
359359
set_output_directory(${name}
360360
BINARY_DIR ${framework_location}
361361
LIBRARY_DIR ${framework_location})
362-
set_target_properties(${name} PROPERTIES PREFIX "")
363-
set_target_properties(${name} PROPERTIES SUFFIX "")
364-
set_target_properties(${name} PROPERTIES BUILD_WITH_INSTALL_RPATH TRUE)
365-
set_target_properties(${name} PROPERTIES INSTALL_NAME_DIR "@rpath/${name}.framework")
362+
set_target_properties(${name} PROPERTIES
363+
BUILD_WITH_INSTALL_RPATH TRUE
364+
FOLDER "SourceKit frameworks"
365+
INSTALL_NAME_DIR "@rpath/${name}.framework"
366+
PREFIX ""
367+
SUFFIX "")
366368

367369
foreach(hdr ${headers})
368370
get_filename_component(hdrname ${hdr} NAME)

0 commit comments

Comments
 (0)